Actually, Zimbra Server doesn’t support Ubuntu Server 9.04. The last version that is support is 8.04 LTS.
So, we will made it from sources (from latest release), for Ubuntu Server 9.04. Of course, I will push a RTU package at the end of the tutorial.
This tutorial is partially based on this one : http://wiki.zimbra.com/index.php?title=Building_Zimbra_using_Perforce
Starting by getting “p4″ (Perforce) client, they versionning tools.
32 bits :
sudo wget -O /usr/local/bin/p4 'http://www.perforce.com/downloads/perforce/r09.1/bin.linux26x86/p4' sudo chmod +x /usr/local/bin/p4
64 bits :
sudo wget -O /usr/local/bin/p4 'http://www.perforce.com/downloads/perforce/r08.2/bin.linux26x86_64/p4' sudo chmod +x /usr/local/bin/p4
Setup dependancy system :
sudo aptitude install lsb libtool libltdl7-dev zlib-bin flex libpcre3-dev g++ libncurses5-dev sudo aptitude install libperl-dev zlibc sudo fetchmail libgmp3c2 openssl ant bison sudo aptitude install libexpat-dev libpopt-dev sudo aptitude install autoconf libz-dev
Setup environment :
export P4PORT=codes.zimbra.com:2666 export BUILD_HOME="/home/public/p4/zcs" export P4EDITOR=vim export JAVA_HOME=/home/public/p4/GNR-D5/jdk1.5.0_20 export PATH=$JAVA_HOME/bin:$PATH export ANT_HOME=/usr/share/ant sudo mkdir -p /home/public/p4 sudo chown -R $USER: /home/public
Download sources (remove -f for a simple update):
p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-D5/...
Download proper JAVA version (1.5)
Go to here : http://java.sun.com/javase/downloads/index_jdk5.jsp#jdk
. Download Java JDK 1.5.0_20 SE. And download Java JDK 1.6.0_16 SE. (We need both, one for building, one for using ! strange but true)
Let’s start building Zimbra package :
32 bits :
cd /home/public/p4/GNR-D5 chmod +x $HOME/Bureau/jdk-1_5_0_20-linux-i586.bin $HOME/Bureau/jdk-1_5_0_20-linux-i586.bin chmod +x $HOME/Bureau/jdk-6u16-linux-i586.bin $HOME/Bureau/jdk-6u16-linux-i586.bin mkdir -p ThirdPartyBuilds/i386/java/ tar zcf ThirdPartyBuilds/i386/java/jdk1.6.0_16.tgz jdk1.6.0_16 sudo rm /usr/local/java sudo ln -sf $PWD/jdk1.5.0_20 /usr/local/java bash -l
64 bits :
cd /home/public/p4/GNR-D5 chmod +x $HOME/Bureau/jdk-1_5_0_20-linux-amd64.bin $HOME/Bureau/jdk-1_5_0_20-linux-amd64.bin chmod +x $HOME/Bureau/jdk-6u16-linux-x64.bin $HOME/Bureau/jdk-6u16-linux-x64.bin mkdir -p ThirdPartyBuilds/x86_64/java/ tar zcf ThirdPartyBuilds/x86_64/java/jdk1.6.0_16.tgz jdk1.6.0_16 sudo rm /usr/local/java sudo ln -sf $PWD/jdk1.5.0_20 /usr/local/java bash -l
Create Zimbra user :
sudo adduser --home /opt/zimbra zimbra sudo chown -R $USER: /opt/zimbra
So, Zimbra doesn’t support UBUNTU9, but UBUNTU8. Of course, it is why I made this tutorial. We have to change the source.
Here magic command to edit all file we have to change :
gvim $(grep UBUNTU8 . -Rl | xargs grep -L UBUNTU9)
Now we have to copy all UBUNTU8 instruction and change it to UBUNTU9. Under gvim for saving, use “:w!”, and for closing file use “:bd”.
Replace “perl-5.8.8″ by “perl5.10.0″.
Replace “libperl-5.8″ by “libperl5.10″.
Don’t change UBUNTU8.def and UBUNTU8_64.def.
Change this script “./ZimbraBuild/rpmconf/Build/get_plat_tag.sh” to add support of UBUNTU9 :
Find “DISTRIB_RELEASE=8″, duplicate it and replace it by “DISTRIB_RELEASE=9″.
When you run it, you should have :
ZimbraBuild/rpmconf/Build/get_plat_tag.sh UBUNTU9_64
Change this script : “ThirdParty/nginx/nginx-0.5.37-zimbra/auto/cc/gcc”.
Find “CFLAGS= … Werror” and comment it.
Let’s start building third party tools :
ThirdParty/buildThirdParty.sh -c
Now, let’s start building Zimbra,
cp -f ZimbraBuild/defs/UBUNTU8_64.def ZimbraBuild/defs/UBUNTU9_64.def cp -f ZimbraBuild/defs/UBUNTU8.def ZimbraBuild/defs/UBUNTU9.def ./ZimbraBuild/buildZCS.sh
The package could be found in ZimbraBuild/zcs-*. So just run the installation script on your server, and it’s done !
Here my building package for Ubuntu Server 9.04 (32 and 64 bits) :
Celogeek

