Ubuntu Feisty Herd5 install

Discuss installation of Scalix software

Moderators: ScalixSupport, admin

Toranaga

Ubuntu Feisty Herd5 install

Postby Toranaga » Thu Mar 08, 2007 4:52 pm

Hi,

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

deepc

Postby deepc » Thu Mar 15, 2007 12:02 pm

Good job, the script installed the server and all services did start.

But i get this error, at apache start:
[Thu Mar 15 16:52:07 2007] [warn] VirtualHost ubuntu-server.home:80 overlaps with VirtualHost ubuntu-server.home:80, the first has precedence, perhaps you need a NameVirtualHost directive

and can not reach scalix

Toranaga

Postby Toranaga » Fri Mar 16, 2007 7:57 am

Yes,

I know this bug. Put this:

Code: Select all

NameVirtualHost $ip:80
<VirtualHost $ip:80>
        ServerName $fqdn
   Include /etc/opt/scalix-tomcat/connector/ajp/app-$host.*.conf
</VirtualHost>
NameVirtualHost $ip:443
<VirtualHost $ip:443>
   ServerName $fqdn
        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>


in your /etc/opt/scalix-tomcat/connector/ajp/instance-$host.conf

Apache has still a broken default-page, but the warning is gone. To fix this you have to add a new line in /etc/hosts

Code: Select all

 $ip apache.$ldomain apache


and change the first line in /etc/apache2/sites-enabled/000-default

Code: Select all

 <VirtualHost apache$ldomain:80>


Now you can reach the default-Website via http://apache.$ldomain

cu
Toranaga

kannafour

Noob help

Postby kannafour » Wed Jul 18, 2007 8:29 am

Hello,
I am very new to linux and scalix. :oops:


The host name of my computer is "xxxx"
The domain I'm trying to create for the mail server is: yyyy.com
The internet IP is pointing to mail.yyyy.com

Could you please tell me what the answers to these questions should be:

What should the name of your primary mailnode be?
What should the name of your local domain be?


Thanks in advance,
Kanna

kannafour

New versions of postgreSQL and Scalix

Postby kannafour » Wed Jul 18, 2007 9:55 am

I have another newbie question...

The script seems to be a bit out dated. There is a new version of PostgreSQL (version 8.2) and a new version of Scalix (11.1.0). Can anyone tell me if it would work if I changed the script to have these two new versions instead of the old ones?

Thanks again in advance.

Kanna


Return to “Installation”



Who is online

Users browsing this forum: No registered users and 7 guests

cron