back to index | deutsch

Setup of Kolab on the server

These instructions are based on the Kolab Quick Installation Manual. The following text mainly focuses on RedHat 9 and our own linux server, so for other problems please turn to the Kolab QIM.

You have two options: Either someone has already given you the compiled rpms for your distribution (e.g. Redhat 9), or you have to compile them yourself.
Please also check zfos.org for many current binary distributions of Kolab.

The first problem I came across was that the / partition was too small. The solution was to create a directory somewhere else, or on an additional harddisk, and link that directory to the default kolab directory:
mkdir /usr/local/kolab
ln -s /usr/local/kolab /kolab

Also consider linking the directory /tmp to e.g. /var/tmp, if you will compile Kolab and your /tmp is on a small partition.

If you are installing kolab on a second OM-SLS server on your network, make sure you have disabled the samba logon for users.

A. Compile Kolab from scratch:

You will need the latest versions of the files from the kolab download site.

This script compile_install.sh can do all the work for you. It is tailored for the current version of OM-SLS 1.4 and Kolab 1.0. It should be easily adaptable to your specific environment.
You will also need the special configuration files from this archive. Unzip all files in your directory where you have saved your downloaded files, and modify the first line in the compile_install.sh script to specify which this directory is. Then execute the script as root.

The following steps describe what the script exactly does, and how to deal with errors.
  1. as user root:
    su
    sh ./openpkg-20030606-20030606.src.sh --prefix=/kolab --user=kolab \
    --group=kolab 2>&1 | tee kolab.log

    sh -x ./openpkg-20030606-20030606.ix86-linux2.4-kol.sh
  2. in the file /etc/init.d/kolab should be the following text:
    #!/bin/sh
    #
    # kolab -- startup/shutdown transfer script for /kolab OpenPKG hierarchy
    #
    [ ! -f /kolab/etc/rc.d/rc.kolab ] && exit 0
    case $1 in
    start ) exec /kolab/etc/rc.d/rc.kolab start ;;
    stop ) exec /kolab/etc/rc.d/rc.kolab stop ;;
    restart ) exec /kolab/etc/rc.d/rc.kolab restart ;;
    esac
  3. as user kolab install the source packages:
    su - kolab
    export PATH=/kolab/bin:/kolab/sbin:$PATH
    rpm -ihv *.src.rpm
  4. The following has to be done for all the packages, in the order that is given in the QIM. See also the script which does it altogether.

    I wrote a function that helps with the switch of users from root to kolab, and does the compiling and completes the installation of a package:

    function compAndInstall()
    {
       # compiles an rpm from source, as user kolab.
       # then installs that new rpm as user root
       PACKAGE=$1
       VERSION=$2
       DEFINE=$3
       cmd="export PATH=/kolab/bin:/kolab/sbin:$PATH; cd /kolab/RPM/SRC/"$PACKAGE"; "
       if [ -z "$3" ]
       then
           cmd=$cmd"rpm -bb "$PACKAGE".spec"
       else
           cmd=$cmd"rpm -ba "$PACKAGE".spec "$DEFINE
       fi
       su - kolab --command="$cmd"
       export PATH=/kolab/bin:/kolab/sbin:$PATH
       /kolab/bin/rpm -Uhv /kolab/RPM/PKG/$PACKAGE-$VERSION.ix86-linux2.4-kol.rpm
    }


    In the script, the several packages are installed like this:
    compAndInstall "make" "3.80-20030109"
    compAndInstall "gdbm" "1.8.3-20030213" "--define 'with_ndbm yes'"


    Make sure, if Apache does not compile, that you try both ways described in the QIM (everything on one line):
    compAndInstall "apache" "1.3.27-20030611" "--define 'with_mod_ssl yes' --define 'with_mod_dav yes' --define 'with_mod_auth_ldap yes' --define 'with_mod_php_openldap yes' --define 'with_mod_php_imap yes' --define 'with_mod_php yes' --define 'with_mod_php_gettext yes' --define 'with_gdbm yes' --define 'with_ndbm yes'"
    or
    compAndInstall "apache" "1.3.27-20030611" "--define 'with_mod_ssl yes' --define 'with_mod_dav yes' --define 'with_mod_auth_ldap yes' --define 'with_mod_php_openldap yes' --define 'with_mod_php_imap yes' --define 'with_mod_php yes' --define 'with_mod_php_gettext yes' --define 'with_gdbm_ndbm yes'

B. Install the provided kolab rpms:

You will need the kolab rpms that someone already compiled for your linux distribution. They have the ending *.kol.rpm.

This script install.sh can do all the work for you. It is tailored for the current version of OM-SLS 1.4 and Kolab 1.0. It should be easily adaptable to your specific environment.
You will also need the special configuration files from this archive. Unzip all files in your directory where you have saved your downloaded files, and modify the first line in the install.sh script to specify which this directory is. Then execute the script as root.

The script should run on its own. For details, also read the QIM.

Finishing the installation

  1. When everything worked, kolab will be bootstrapped in the end. You will get prompted for details.
    The hostname will be defaulted to the current hostname.
    KOLAB BOOTSTRAP

    Please enter Hostname [kolab.ict.om.org]:
    proceeding with Hostname kolab.ict.om.org
    Please enter your Maildomain [ict.om.org]:
    proceeding with Maildomain ict.om.org
    Generating default configuration:
    base_dn : dc=kolab,dc=d,dc=om,dc=org
    bind_dn : cn=manager,dc=kolab,dc=d,dc=om,dc=org
    Please choose a manager password [HKwcVTaTCFRc.]:blablabla
    bind_pw : blablabla
    done modifying /kolab/etc/kolab/kolab.conf

    IMPORTANT NOTE:
    use login=manager and passwd=blablabla when you log into the webinterface!
  2. There was a problem with access rights. See also the thread on the kroupware mailing list.
    The permissions on the directory (/kolab/etc/kolab) should read:
    drwxr-xr-x    2 kolab    kolab
    To accomplish that, type chmod o+rx /kolab/etc/kolab

  3. I had a problem with an already existing service running on the server.

    Some commands that help you deal with such problems:

    There is already running an apache httpd server, which provides for the intranet webpages at the moment. I deactivated it completely. That is just an interim solution, and would have to be solved in a better way when it is fully integrated into OM SLS.

  4. Another problem is the ipchains firewall, which blocks the https, ftp and ldap traffic. You need to configure it carefully.
    For the OM SLS, I created a copy of the file /etc/om-firewall.d/S62.internal.local:
    cp /etc/om-firewall.d/S62.internal.local /etc/om-firewall.d/S65.internal.kolab
    and uncommented the lines ending in "https", "imap", "ldap" and "ftp". I also had to add a line for "ftp-data".
    Then restart the firewall, type /etc/init.d/om-firewall restart

  5. Because I had problems with the reading of freebusy times from https, I enabled reading from the ftp server, by moving the "READ" from the "deny" block to the "allow" block.

    in /kolab/etc/kolab/proftpd.conf.template:
    <Directory /*>
        AllowOverwrite    on
        <Limit STOR
    READ>
            AllowAll
        </Limit>
        <Limit WRITE DIRS>
            IgnoreHidden  on
            DenyAll
        </Limit>
    </Directory>

    You have to restart kolab (/etc/init.d/kolab restart) and sometimes execute /kolab/sbin/proftpd in order to have the changes to your ftp server configuration.

    If for whatever reason you don't want to use the LDAP authentication with user "freebusy" and password "freebusy", you can disable LDAP authentication, by commenting the lines:
    #LDAPServer            @@@ldap_ip@@@
    #LDAPDNinfo            "@@@php_dn@@@" "@@@php_pw@@@"
    #LDAPDoAuth            on "@@@base_dn@@@" "(uid=freebusy)"
    Now you need anonymous authentication, just add these lines to the end of your proftpd.conf.template:
    <Anonymous /kolab/var/kolab/www/freebusy>
            user kolab-n
            group kolab-n
            AnonRequirePassword off
            UserAlias     anonymous kolab-n
            RequireValidShell    off
            MaxClients    30
            <Directory /*>
            AllowOverwrite on
            <Limit STOR READ
    >
                #
    WRITE DIRS not required in the limit line
                AllowAll
            </Limit>
            </Directory>       
    </Anonymous>


  6. In the setup in OM, we don't need the postfix mail server, because it is already provided by the OM SLS.
    I disabled postfix in /kolab/etc/rc.d/rc.kolab
    #    echo "starting postfix ..."
    #    /kolab/sbin/postfix start
    and
    #    echo "stopping postfix ..."
    #    /kolab/sbin/postfix stop

  7. some ways how to find out about errors, useful hints for testing:
back to index


compile_install.sh
# needs to be changed to the position of the downloaded files from erfrakon
kolabinstall=/home/timop/kolab

function compAndInstall()
{
# compiles an rpm from source, as user kolab.
# then installs that new rpm as user root
PACKAGE=$1
VERSION=$2
DEFINE=$3
cmd="export PATH=/kolab/bin:/kolab/sbin:$PATH; cd /kolab/RPM/SRC/"$PACKAGE"; "
if [ -z "$3" ]
then
cmd=$cmd"rpm -bb "$PACKAGE".spec"
else
cmd=$cmd"rpm -ba "$PACKAGE".spec "$DEFINE
fi
su - kolab --command="$cmd"
export PATH=/kolab/bin:/kolab/sbin:$PATH
/kolab/bin/rpm -Uhv /kolab/RPM/PKG/$PACKAGE-$VERSION.ix86-linux2.4-kol.rpm
}


# some preparation to have enough diskspace (our / partition is not big enough)
mkdir /usr/local/kolab
ln -s /usr/local/kolab /kolab
mv /tmp /usr/local/kolab/tmp
ln -s /usr/local/kolab/tmp/ /tmp

# bootstrap openpkg
ln -s $kolabinstall /kolabsrc
mkdir /kolab/install
cd /kolab/install
sh $kolabinstall/openpkg-20030606-20030606.src.sh --prefix=/kolab --user=kolab --group=kolab 2>&1 | tee kolab.log
sh -x ./openpkg-20030606-20030606.ix86-linux2.4-kol.sh

# install the src rpms
su - kolab --command="export PATH=/kolab/bin:/kolab/sbin:$PATH; cd /kolabsrc; rpm -ihv *.src.rpm"

# compile and install the required packages
compAndInstall "make" "3.80-20030109"
compAndInstall "patch" "2.5.9-20030520"
compAndInstall "binutils" "2.14-20030613"
compAndInstall "gcc" "3.3-20030614"
compAndInstall "fsl" "1.1.0-20030522"
compAndInstall "procmail" "3.22-20030330"
compAndInstall "zlib" "1.1.4-20030227"
compAndInstall "expat" "1.95.6-20030130"
compAndInstall "readline" "4.3-20020718"
compAndInstall "ncurses" "5.3.20030614-20030615"
compAndInstall "perl" "5.8.0-20030409"
compAndInstall "perl-openpkg" "20030515-20030515"
compAndInstall "openssl" "0.9.7b-20030530"
compAndInstall "perl-ds" "20030123-20030123"
compAndInstall "perl-time" "20030325-20030325"
compAndInstall "perl-xml" "20030614-20030614"
compAndInstall "perl-term" "20030411-20030411"
compAndInstall "perl-crypto" "20030309-20030309"
compAndInstall "perl-conv" "20030513-20030513"
compAndInstall "perl-ssl" "20030614-20030614"
compAndInstall "perl-sys" "20030612-20030612"
compAndInstall "perl-util" "20030610-20030610"
compAndInstall "perl-mail" "20030521-20030521"
compAndInstall "perl-net" "20030614-20030614"
compAndInstall "perl-www" "1.2.1-1.2.1"
compAndInstall "perl-ldap" "20030520-20030520"
compAndInstall "m4" "1.4o-20020206"
compAndInstall "bison" "1.35-20030604"
compAndInstall "sed" "4.0.7-20030411"
compAndInstall "libiconv" "1.9.1-20030529"
compAndInstall "gettext" "0.12.1-20030528"
compAndInstall "imap" "2002d-20030530"
compAndInstall "getopt" "20030307-20030609"
compAndInstall "flex" "2.5.4a-20030402"
compAndInstall "pcre" "4.3-20030530"
compAndInstall "db" "4.1.25.1-20030605"
compAndInstall "mm" "1.3.0-20030307"

compAndInstall "gdbm" "1.8.3-20030213" "--define 'with_ndbm yes'"
compAndInstall "openldap" "2.1.21-20030609" "--define 'with_sasl no'"
compAndInstall "sasl" "2.1.13-20030530_kolab" "--define 'with_ldap yes' --define 'with_login yes'"
compAndInstall "postfix" "2.0.12-20030617" "--define 'with_sasl yes' --define 'with_tls yes' --define 'with_ldap yes'"
compAndInstall "imapd" "2.1.14-20030707_kolab" "--define 'with_groupfile_hack yes' --define 'with_vhost_hack yes'"
#compAndInstall "apache" "1.3.27-20030611" "--define 'with_mod_ssl yes' --define 'with_mod_dav yes' --define 'with_mod_auth_ldap yes' --define 'with_mod_php_openldap yes' --define 'with_mod_php_imap yes' --define 'with_mod_php yes' --define 'with_mod_php_gettext yes' --define 'with_gdbm yes' --define 'with_ndbm yes'"
compAndInstall "apache" "1.3.27-20030611" "--define 'with_mod_ssl yes' --define 'with_mod_dav yes' --define 'with_mod_auth_ldap yes' --define 'with_mod_php_openldap yes' --define 'with_mod_php_imap yes' --define 'with_mod_php yes' --define 'with_mod_php_gettext yes' --define 'with_gdbm_ndbm yes'
compAndInstall "proftpd" "1.2.8-20030609" "--define 'with_ldap yes'"
compAndInstall "kolab" "1.0-1.0.12" " "

# clean up
rm /tmp
mv /usr/local/kolab/tmp /tmp
rm /kolabsrc
rm -Rf /kolab/install

/sbin/chkconfig httpd off
/sbin/service httpd stop

# copy some prepared config files
cp kolab.init /etc/init.d/kolab
chmod a+x /etc/init.d/kolab
cp S65.internal.kolab /etc/om-firewall.d
chmod u+x /etc/om-firewall.d/S65.internal.kolab
cp proftpd.conf.template /kolab/etc/kolab
cp kolab.rc /kolab/etc/rc.d
chmod o+rx /kolab/etc/kolab

/kolab/etc/kolab/kolab_bootstrap -b
/kolab/etc/rc.d/rc.kolab start

/etc/init.d/om-firewall restart
/etc/init.d/kolab restart


echo "The compiled packages are in /kolab/RPM/PKG/*kol.rpm"
echo "building and installing of kolab finished."


install.sh
# needs to be changed to the position of the compiled files from whereever you got them
kolabinstall=/home/timop/kolab

# some preparation to have enough diskspace (our / partition is not big enough)
mkdir /usr/local/kolab
ln -s /usr/local/kolab /kolab

# bootstrap openpkg
sh -x ./openpkg-20030606-20030606.ix86-linux2.4-kol.sh

# install the required packages
export PATH=/kolab/bin:/kolab/sbin:$PATH
/kolab/bin/rpm -Uhv make-*-kol.rpm
/kolab/bin/rpm -Uhv patch-*-kol.rpm
/kolab/bin/rpm -Uhv binutils-*-kol.rpm
/kolab/bin/rpm -Uhv gcc-*-kol.rpm
/kolab/bin/rpm -Uhv procmail-*-kol.rpm
/kolab/bin/rpm -Uhv zlib-*-kol.rpm
/kolab/bin/rpm -Uhv expat-*-kol.rpm
/kolab/bin/rpm -Uhv readline-*-kol.rpm
/kolab/bin/rpm -Uhv openssl-*-kol.rpm
/kolab/bin/rpm -Uhv perl-*-kol.rpm
#/kolab/bin/rpm -Uhv perl-openpkg*-kol.rpm
#/kolab/bin/rpm -Uhv perl-conv*-kol.rpm
#/kolab/bin/rpm -Uhv perl-ssl*-kol.rpm
#/kolab/bin/rpm -Uhv perl-ds*-kol.rpm
#/kolab/bin/rpm -Uhv perl-time*-kol.rpm
#/kolab/bin/rpm -Uhv perl-util*-kol.rpm
#/kolab/bin/rpm -Uhv perl-mail*-kol.rpm
#/kolab/bin/rpm -Uhv perl-net*-kol.rpm
#/kolab/bin/rpm -Uhv perl-term*-kol.rpm
#/kolab/bin/rpm -Uhv perl-sys*-kol.rpm
#/kolab/bin/rpm -Uhv perl-crypto*-kol.rpm
#/kolab/bin/rpm -Uhv perl-www*-kol.rpm
#/kolab/bin/rpm -Uhv perl-xml*-kol.rpm
#/kolab/bin/rpm -Uhv perl-ldap*-kol.rpm
/kolab/bin/rpm -Uhv m4-*-kol.rpm
/kolab/bin/rpm -Uhv bison-*-kol.rpm
/kolab/bin/rpm -Uhv sed-*-kol.rpm
/kolab/bin/rpm -Uhv libiconv-*-kol.rpm
/kolab/bin/rpm -Uhv gettext-*-kol.rpm
/kolab/bin/rpm -Uhv imap-*-kol.rpm
/kolab/bin/rpm -Uhv getopt-*-kol.rpm
/kolab/bin/rpm -Uhv flex-*-kol.rpm
/kolab/bin/rpm -Uhv pcre-*-kol.rpm
/kolab/bin/rpm -Uhv fsl-*-kol.rpm
/kolab/bin/rpm -Uhv gdbm-*-kol.rpm
/kolab/bin/rpm -Uhv db-*-kol.rpm
/kolab/bin/rpm -Uhv mm-*-kol.rpm
/kolab/bin/rpm -Uhv ncurses-*-kol.rpm
/kolab/bin/rpm -Uhv openldap*kol.rpm
/kolab/bin/rpm -Uhv sasl*kol.rpm
/kolab/bin/rpm -Uhv postfix*kol.rpm
/kolab/bin/rpm -Uhv imapd*kol.rpm
/kolab/bin/rpm -Uhv apache*kol.rpm
/kolab/bin/rpm -Uhv proftpd*kol.rpm
/kolab/bin/rpm -Uhv kolab*kol.rpm

/sbin/chkconfig httpd off
/sbin/service httpd stop

# copy some prepared config files
cp kolab.init /etc/init.d/kolab
chmod a+x /etc/init.d/kolab
cp S65.internal.kolab /etc/om-firewall.d
chmod u+x /etc/om-firewall.d/S65.internal.kolab
cp proftpd.conf.template /kolab/etc/kolab
cp kolab.rc /kolab/etc/rc.d
chmod o+rx /kolab/etc/kolab

/kolab/etc/kolab/kolab_bootstrap -b
/kolab/etc/rc.d/rc.kolab start

/etc/init.d/om-firewall restart
/etc/init.d/kolab restart

echo "installing of kolab finished."