Manual Installation Debian Etch

From Scalix Wiki
Revision as of 06:43, 30 March 2007 by Christoph.lukas (Talk | contribs) (Testing your installation)

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-2007 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
scalix11downloadurl="http://downloads.scalix.com/.community/11.0.2.1/scalix-11.0.2.1-GA-debian-intel.tgz"
scalix11targz="scalix-11.0.2.1-GA-debian-intel.tgz"
scalix11dir="scalix-debian-11.0.2.1-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

# Extract and install packages
tar xvfz $scalix11targz
cd $scalix11dir
dpkg -i ../../third_party/libical/i386/libical*.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
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;%PLATFORMURL%;$fqdn;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" \
    $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

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