How-To install Zimbra in Ubuntu Server 9.04 Jaunty

Written by Administrator on . Posted in Latest News

This tutorial is just a translation of the french original available HERE by Celogeek

********************************

Ubuntu Server 9.04 + Zimbra

********************************

TRANSLATION

********************************

Well, currently, Zimbra Server only supports Ubuntu Server version 8.04 LTS. In my case, I'm using Ubuntu Server 9.04.

We are going to start by using the latest sources (the last beta), to construct the packages for Ubuntu Server 9.04. Obviously, I will supply at the end of this tutorial the package (tgz), RTU (Ready To Use).

This tutorial was also based on: http://wiki.zimbra.com/index.php?title=Building_Zimbra_using_Perforce

Let's start by downloading the client  « p4″ (Perforce), which is the utils version.

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

Installation of dependencies :

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

Environment preparation:

export P4PORT=codes.zimbra.com:2666
export BUILD_HOME="/home/public/p4/zcs"
export P4EDITOR=vim
export JAVA_HOME=/home/public/p4/main/jdk1.5.0_19
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 the sources (add the -f to do a simple update of the most current sources):

p4 -u public -P public1234 -c public-view sync -f //depot/zcs/main/...

Now let's download the main JAVA version (1.5) :
In this page : http://java.sun.com/javase/downloads/index_jdk5.jsp
You should correctly insert your email address, One email will be sent to your address in order to download JAVA.
Next we are going to create Zimbra PACK:

cd /home/public/p4/main
chmod +x $HOME/Bureau/jdk-1_5_0_19-linux-amd64.bin
$HOME/Bureau/jdk-1_5_0_19-linux-amd64.bin
mkdir -p ThirdPartyBuilds/x86_64/java/
tar zcf ThirdPartyBuilds/x86_64/java/jdk1.5.0_19.tgz jdk1.5.0_19
sudo ln -s $PWD/jdk1.5.0_19 /usr/local/java
bash -l

Next we will create the Zimbra user:

sudo adduser --home /opt/zimbra zimbra
sudo chown -R $USER: /opt/zimbra

Well, Zimbra does not support UBUNTU9, but UBUNTU8 is fully supported. Or this tutorial would not be useful. Therefore we are going to modify the sources to make Zimbra compatible withUBUNTU9.

Here's the magical command to edit all the files that need to be modified:

cp ./ZimbraBuild/defs/UBUNTU8_64.def ./ZimbraBuild/defs/UBUNTU9_64.def
cp ./ZimbraBuild/defs/UBUNTU8.def ./ZimbraBuild/defs/UBUNTU9.def
gvim $(grep UBUNTU8 . -Rl | xargs grep -L UBUNTU9)

To modify the files a give the correct settings location in UBUNTU9 instead of UBUNTU8. In gvim to save, use « :w! », to close the file and go to the next one « :bd ».
Where it's written « perl-5.8.8″, it should read « perl5.10.0″.
Where it's written « libperl-5.8″, it should read « libperl5.10″.
Do not modify the files UBUNTU8.def et UBUNTU8_64.def.

Change the script script « ./ZimbraBuild/rpmconf/Build/get_plat_tag.sh » to include UBUNTU9 :
Search « DISTRIB_RELEASE=8″, create a copy of the entry and add under « DISTRIB_RELEASE=9″.
When launching the script, this should be the result :

ZimbraBuild/rpmconf/Build/get_plat_tag.sh
UBUNTU9_64

Change the script: « ThirdParty/nginx/nginx-0.5.37-zimbra/auto/cc/gcc ».

Search « CFLAGS= … Werror » and add a custom comment to this line.

Launch the software compilation:

ThirdParty/buildThirdParty.sh -c

Now, let's build 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 installation pack can be found inside the folder ZimbraBuild/zcs-*. The only thing missing is just to launch the installation script in your server!

Here's my compiled version for Ubuntu Server 9.04 64 bits :

 

********************

ORIGINAL LINKS:

********************