Manual Installation Debian Etch

From Scalix Wiki
Revision as of 19:04, 9 January 2008 by Christoph.lukas (Talk | contribs) (Modified for 11.3)

Jump to: navigation, search

Manual Installation on Debian Etch

This is an attempt to supply a simple script to install the latest Scalix Community Edition on a system running Debian Etch.

If you already have downloaded the tar.gz file copy it to /tmp so that the script can find it.

You can copy & paste the whole script into your favorite editor and run it from the commandline or simply copy & paste it line by line.

Preparation

Please take a look at Manual_Installation to make sure your system fullfills all necessary requirements. Pay special attention to your network configuration. Your /etc/hosts file should contain at least the following two lines:

127.0.0.1    localhost
<yourexternalip>  <hostname.domain.com> <hostname>

Make sure your /etc/apt/sources.list contains appropriate deb lines for etch containing main and non-free. e.g:

deb http://ftp.debian.org/debian etch main non-free contrib

Installation script

#!/bin/bash

#
# (C) 2006-2008 Christoph Lukas <christoph.lukas@gmx.net>
#  05-23-2007 modified to setup the mobile client by Peter Ulrich
#  06-11-2007 adapted for 11.1.0 Till Wimmer <scalix@tonarchiv.ch>
#  01-09-2008 adapted for 11.3.0 Christoph Lukas <christoph.lukas@gmx.net>
#
# private message via scalix forums: http://www.scalix.com/forums/privmsg.php?mode=post&u=4501

echo -n "What should the name of your primary mailnode be? "; read mnode
echo -n "Please enter the admin password for the Scalix admin user (sxadmin)? "; read admpwd
echo -n "Please enter a password for the ldap query user? "; read ldappwd
echo -n "Please enter a password for the db user? "; read dbpwd
echo -n "Please enter the external ip address of your Scalix box? "; read ip

tomcatport=80
ldapport=389
scalix11downloadurl="http://downloads.scalix.com/.community/11.3/scalix-11.3.0-GA-unsupported-debian-intel.bin"
scalix11bin="scalix-11.3.0-GA-unsupported-debian-intel.bin"
scalix11dir="scalix-debian-11.3.0-GA/software/scalix_server"
ldomain=$(hostname -d)
host=$(hostname)
fqdn=$(hostname -f)
short=${host:0:1}${host: -1:1}

# Update and install required packages
aptitude update
aptitude upgrade
aptitude install apache2 libapache2-mod-jk gawk krb5-config krb5-doc krb5-user libkadm55 libkrb53 \
       libglib2.0-0 libstdc++2.10-glibc2.2 libxml2 sgml-base xml-core postgresql libsasl2-modules \
       libsasl2-gssapi-mit sendmail elinks w3m sun-java5-jre libssl0.9.7 libstdc++5 wget

# Remove sendmail startup links
# This disables outgoing mail
#/etc/init.d/sendmail stop
#update-rc.d -f sendmail remove

# Download Scalix 11
cd /tmp/
wget -N $scalix11downloadurl
chmod 755 $scalix11bin

# Extract and install packages
./$scalix11bin
cd $scalix11dir
dpkg -i scalix-libical_*.deb scalix-chardet_*.deb
dpkg -i scalix-server_*.deb
dpkg -i scalix-postgres_*.deb scalix-tomcat-connector_*.deb scalix-tomcat_*.deb \
        scalix-mobile_*.deb scalix-platform_*.deb scalix-res_*.deb scalix-sac_*.deb \
        scalix-sis_*.deb scalix-swa_*.deb
cd

# Setup mailnode
export PATH=/opt/scalix/bin:$PATH
ommakeom
sxconfig --set -t general.usrl_cn_rule='G S'
sxconfig --set -t general.usrl_authid_rule='l@'
sxconfig --set -t orniasys.name_part_1='"C" <S>' -t orniasys.domain_part_1="$ldomain"
omaddmn -m $mnode
omrc -n
omadmidp -a -s 66000 -n 100
omaddu -n sxadmin/$mnode --class limited -c admin -p "$admpwd" sxadmin
omconfenu -n "sxadmin/$mnode"
omlimit -u "sxadmin/$mnode" -o -i 0 -m 0
omaddu -n sxqueryadmin/$mnode --class limited -c admin -p $ldappwd sxqueryadmin@$fqdn
omaddpdl -l ScalixUserAdmins/$mnode
omaddpdl -l ScalixUserAttributesAdmins/$mnode
omaddpdl -l ScalixGroupAdmins/$mnode
omaddpdl -l ScalixAdmins/$mnode
omon -s all

# Setup DB
cd /opt/scalix-postgres/bin
./sxpsql-setpwd $dbpwd
./sxpsql-whitelist 127.0.0.1 $ip

# Configure Scalix
base=/var/opt/scalix/${short}
files="$base/webmail/swa.properties \
       $base/caa/scalix.res/config/ubermanager.properties \
       $base/res/config/res.properties \
       $base/platform/platform.properties \
       $base/mobile/mobile.properties \
       $base/sis/sis.properties"

for file in $files; do
sed -e "s;%LOCALDOMAIN%;$ldomain;g" \
    -e "s;%LOCALHOST%;$fqdn;g" \
    -e "s;swa.platform.url=http://%PLATFORMURL%:8080/api;swa.platform.url=http://$fqdn/api;g" \
    -e "s;%PLATFORMURL%;http://$fqdn/api;g" \
    -e "s;__SECURED_MODE__;false;g" \
    -e "s;ubermanager/__FQHN_HOST__@__KERBEROS_REALM__;;g" \
    -e "s;__KERBEROS_REALM__;;g" \
    -e "s;__FQHN_FOR_KDC_HOST__;;g" \
    -e "s;__FQHN_QUERY_SERVER_NAME__;$fqdn;g" \
    -e "s;__UBERMGR_USE_EXTERNAL_AUTH__;false;g" \
    -e "s;__UBERMGR_ALLOW_EXTERNAL_AUTH__;false;g" \
    -e "s;__UBERMGR_MAXLIST_SIZE__;100;g" \
    -e "s;__UBERMGR_MAIL_DOMAINS_LIST__;$ldomain;g" \
    -e "s;__UBERMGR_EXTERNAL_DOMAIN_AUTH_LIST__;;g" \
    -e "s;__CONFIGURED__;true;g" \
    -e "s;__FQHN_FOR_UBERMANAGER__;$fqdn;g" \
    -e "s;__TOMCAT_PORT__;$tomcatport;g" \
    -e "s;localhost;$fqdn;g" \
    -e "s;%SIS-LANGUAGE%;German;g" \
    -e "s;%INDEX-WHITELIST%;$fqdn;g" \
    -e "s;%SEARCH-WHITELIST%;$fqdn;g" \
    -e "s;%IMAPHOST%;$fqdn;g" \
    -e "s;%SMTPHOST%;$fqdn;g" \
    -e "s;%LDAPPORT%;389;g" \
    -e "s;%DBHOST%;$fqdn:5733;g" \
    -e "s;%DBPASSWD%;$dbpwd;g" \
    $file > $file.neu
mv $file.neu $file
done

# Write Ldappassword to psdata
cd ${base}/caa/scalix.res/config
echo "$ldappwd" > psdata
chown root:root psdata
chmod 400 psdata
cd

# Restart Tomcat
/etc/init.d/scalix-tomcat restart

# Setup Apache
ln -s /opt/scalix/global/httpd/scalix-web-client.conf /etc/apache2/conf.d
cat << EOF > /etc/apache2/conf.d/scalix-access.conf
<Location />
        Allow from all
</Location>
EOF
/etc/init.d/apache2 restart

cat << EOT
#####################################################
# You should now be able to access scalix at:
# http://$fqdn/sac
# http://$fqdn/webmail
#####################################################
EOT

Finishing your installation

In order for your Scalix server to be fully operational, you need to do some changes to some config files, as described in the section "Configuring Scalix Applications" in Manual_Installation.

Bug in /opt/scalix-tomcat/bin/determine-java-home:16

JAVA_HOME=$(echo $alternative | sed 's@/bin/java$@@')

Testing your installation

Now try to login to your administration console at: http://your-server-name/sac

and to Scalix webmail at: http://your-server-name/webmail

If you are getting a message "503 Service Temporarily Unavailable" wait some time for tomcat to start up. This takes about 40 seconds on my system.

Please take another look at Manual_Installation for additional hints not covered by the above script.

Troubleshooting

If it does not work as described do not hesitate to contact me.

mailto:christoph.lukas-AT-gmx.net

Private Message