perhaps somebody is interested in a working install script for Ubuntu Feisty:
Code: Select all
#!/bin/bash
tomcatport=80
ldapport=389
startdir=$PWD
#ldappwd=$admpwd
#dbpwd=$admpwd
mnode=$(hostname)
ip=$(hostname -i)
ldomain=$(hostname -d)
host=$(hostname)
fqdn=$(hostname -f)
short=${host:0:1}${host: -1:1}
if [ $fqdn != $host.$ldomain ] || [ $ldomain = "" ] ; then
echo -n "What should the name of your primary mailnode be? "; read mnode
echo -n "What should the name of your local domain be? "; read ldomain
echo -n "Please enter the external ip address of your Scalix box? "; read ip
cat /etc/hosts \
| sed -e "s;localhost;;g" \
| sed -e "s;127.0.0.1;127.0.0.1 localhost\n$ip $mnode.$ldomain $mnode;g" \
> /etc/hosts.new
mv -f /etc/hosts.new /etc/hosts
fi
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
ln -sf /bin/bash /bin/sh
scalix11downloadurl="http://downloads.scalix.com/.community/11.0.2/scalix-11.0.2-GA-debian-intel.tgz"
scalix11targz="scalix-11.0.2-GA-debian-intel.tgz"
scalix11dir="scalix-debian-11.0.2-GA/software/scalix_server"
libicaldownloadurl="http://www.scalix.com/ceraw/download/scalix11preview/third_party/libical/libical_0.24.RC4.20050413_i386.deb"
aptitude update
aptitude upgrade -y
aptitude install -y 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-8.1 libsasl2-modules \
libsasl2-gssapi-mit elinks w3m sun-java5-jre libssl0.9.7 libstdc++5 wget \
openssl dpkg-repack
wget -N -c $libicaldownloadurl
wget -N -c $scalix11downloadurl
# Extract and install packages
dpkg -i libical*.deb
tar xvfz $scalix11targz
mkdir -p $startdir/packages/binary
cp scalix-debian-11.0.2-GA/software/scalix_server/*.deb $startdir/packages/binary
cp scalix-debian-11.0.2-GA/third_party/libical/i386/*.deb $startdir/packages/binary
cd $startdir/packages
dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
echo deb file://$startdir/packages binary/ >> /etc/apt/sources.list
apt-get update
apt-get remove exim4-daemon-light
apt-get install -y --force-yes scalix-server sendmail fetchmail
/opt/scalix/bin/ommakeom
# Setup mailnode
export PATH=/opt/scalix/bin:$PATH
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
apt-get install -y --force-yes scalix-postgres scalix-tomcat-connector scalix-tomcat
apt-get install -y --force-yes scalix-mobile scalix-platform scalix-res scalix-sac \
scalix-sis scalix-swa
# Setup DB
cd /opt/scalix-postgres/bin
./sxpsql-setpwd $dbpwd
./sxpsql-whitelist 127.0.0.1 $ip
# Configure Scalix
files="/var/opt/scalix/$short/webmail/swa.properties /var/opt/scalix/$short/caa/scalix.res/config/ubermanager.properties
/var/opt/scalix/$short/res/config/res.properties /var/opt/scalix/$short/platform/platform.properties
/var/opt/scalix/$short/mobile/mobile.properties /var/opt/scalix/$short/sis/sis.properties"
for file in $files; do
sed -e "s;platform.url=%PLATFORMURL%;platform.url=http://$fqdn/api;g" \
-e "s;swa.platform.enabled=false;swa.platform.enabled=true;g" \
-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;%IMAPHOST%;$fqdn;g" \
-e "s;%SMTPHOST%;$fqdn;g" \
-e "s;%LDAPPORT%;$ldapport;g" \
-e "s;%DBHOST%;$fqdn:5733;g" \
-e "s;%DBPASSWD%;$dbpwd;g" \
-e "s;%SIS-LANGUAGE%;English;g" \
-e "s;%INDEX-WHITELIST%;127.0.0.1,$ip,$fqdn;g" \
-e "s;%SEARCH-WHITELIST%;127.0.0.1,$ip,$fqdn;g" \
$file > $file.neu
mv $file.neu $file
done
# Write Ldappassword to psdata
cd /var/opt/scalix/$short/caa/scalix.res/config
echo "$ldappwd" > psdata
chown root:root psdata
chmod 400 psdata
cd /etc/apache2
mkdir ssl
cd ssl
openssl genrsa 1024 > server.key
openssl req -new -x509 -nodes -sha1 -days 365 -key server.key > server.crt
cat << EOF > /etc/opt/scalix-tomcat/connector/ajp/instance-$host.conf
<VirtualHost $fqdn:80>
Include /etc/opt/scalix-tomcat/connector/ajp/app-$host.*.conf
</VirtualHost>
<VirtualHost $fqdn:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
Include /etc/opt/scalix-tomcat/connector/ajp/app-$host.*.conf
</VirtualHost>
EOF
cat << EOF > /etc/apache2/ports.conf
Listen 80
Listen 443
EOF
cat << EOF > /etc/apache2/mods-available/proxy.conf
<IfModule mod_proxy.c>
#turning ProxyRequests on and allowing proxying from all may allow
#spammers to use your proxy to send email.
ProxyRequests Off
<Proxy *>
AddDefaultCharset on
Order deny,allow
#Deny from all
Allow from $ldomain
</Proxy>
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
ProxyVia On
</IfModule>
EOF
ln -sf /etc/apache2/mods-available/ssl.load /etc/apache2/mods-enabled
/etc/init.d/scalix-tomcat restart
/etc/init.d/scalix restart
/etc/init.d/scalix-postgres restart
ln -s /opt/scalix/global/httpd/scalix-web-client.conf /etc/apache2/conf.d
/etc/init.d/apache2 restart
#cat /etc/apt/sources.list \
# | sed -e 's;deb file:///home/packages binary/;;g' \
# > /etc/apt/sources.list.new
#mv /etc/apt/sources.list.new /etc/apt/sources.list
#apt-get update
#ln -sf /bin/dash /bin/sh
#cd /$PWD
#rm -dfR packages
cd $startdir
It is based on work from someone else of this forum, the wiki and fixed for ubuntu.
cu
Toranaga