Building Zimbra on Fedora Core 5 and x86 64
From Zimbra :: Wiki
|- This is archive documentation, which means it is not supported or valid for recent versions of Zimbra Collaboration.|
|This article applies to the following ZCS versions.|
This documentation is in the process of being rewritten. The documentation that comes with Zimbra is way out of date for source building.
Grab JVM 1.5
First of all, go grab a real JVM. Fedora ships with gcj rather then a default Java JVM. You can get the JVM from java.sun.com (make sure it's version 1.5. Earlier versions don't support generics, version 6 has some SQL stuff that breaks ZimbraIM).
JVM 1.5 is also called JDK 5 and can be downloaded from Java SE Downloads - Previous Release - JDK 5 page
Check the Source Code out from Subversion
Check the source code out:
svn co https://zimbra.svn.sourceforge.net/svnroot/zimbra/trunk zimbra
Note that you may find references to CRAY versus Main. Those tags only mattered with the old cvs repository.
you used the i386 version right? Zimbra doesn't provide a libzimbra-native jni library for x86-64
Building the Web Server for Zimlets.
Zimbra uses a httpd instance for Zimlets and the spell checker. Apache 2.0.54 is used for this. Zimbra documentation has a tendency to be wrong about versions, so check the makefile carefully for whatever version the software is currently expecting.
- Zimbra Folks... Would it be possible to put up a copy of the ThirdParty stuff uncompiled? You lose a lot of time just digging for the software
Build the web server:
cd main/ThirdParty/apache-httpd wget http://archive.apache.org/dist/httpd/httpd-2.0.54.tar.gz sudo make
The final output should look like:
(cd /opt/zimbra; tar czf \ /home/Projects/Source/Zimbra/main/ThirdParty/apache-httpd/builds/UNKNOWN/httpd-2.0.54.tgz \ httpd-2.0.54) chmod -R a+w \ /home/Projects/Source/Zimbra/main/ThirdParty/apache-httpd/builds/UNKNOWN/httpd-2.0.54.tgz
Amavisd -- Mail filtering in the Secure Layer
Zimbra segregates itself by using two seperate mail systems. The first email server is Postfix. Postfix receives the emails from the outside world and passes them on to a perl program called Amavis. Amavis integrates Postfix with Spamassasin, ClamAV and DSPAM and provides standard site wide filtering actions and returns the email to postfix.
- Be very careful if you are screwing with Postfix. Chances are you could probably do it in Amavis.
- Be cautious about security. Postfix is designed to be fast and secure, but email security problems have only recently be passed by web security problems as hackers entry way of choice.
To Install Amavisd, you need to do the following:
cd ../amavisd wget http://www.ijs.si/software/amavisd/amavisd-new-2.3.3.tar.gz tar xzf amavisd-new-2.3.3.tar.gz cd amavisd-new-2.3.3 patch -p0 < ../amavisd.2.3.3.patch
Amavis does not have a Makefile. We can't test the build until we build the whole thing.
Net Snmp monitors the server in the industry standard snmp format.
mkdir ../snmp get net-snmp-5.1.2.tar.gz # (You have to dig for this. I found it at ftp://ftp.freesnmp.com/mirrors/net-snmp/) tar xzf net-snmp-5.1.2.tar.gz cd net-snmp-5.1.2 ./configure --prefix=/opt/zimbra/snmp-5.1.2 # ( Some questions where asked here. I went with the defaults, but if anything breaks, this is a good thing to check) make sudo make install cd /opt/zimbra sudo tar czf snmp-5.1.2.tar.gz snmp-5.1.2 echo Do the last two steps manually # cd your zimbra Directory/ThirdParty/snmp # sudo /opt/zimbra/snmp-5.1.2.tar.gz .
Aspell enables the spelling service for Zimbra. Unfortuntily the version of aspell is behind the times and has a few problems with the more modern gcc-g++. So we are going to build this package using the compat-gcc instead (GCC 3.2). To do that, change the Makefile in the aspell directory. Go to the line that includes ./configure and change it to be the following:
./configure --prefix=/opt/zimbra/aspell-$(ASPELL_VERSION) CXX=g++32; make)
Newer version of Aspell also have this problem. Revised install:
cd ../aspell wget ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-6.0-0.tar.bz2 wget ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.3.tar.gz EDITOR=`if [ ! "x$EDITOR" = "x" ]; then echo $EDITOR; else if [ -f /usr/bin/editor ]; then echo /usr/bin/editor; else echo $(which vi); fi; fi` $EDITOR Makefile # Edit the make file and change the configure line to (tab) ./configure --prefix=/opt/zimbra/aspell-$(ASPELL_VERSION) CXX=g++32; make)
--BEGIN-- To build with GCC g++ > 3.2 edit the following file:
aspell-0.60.3/modules/filter/nroff.cpp:76 - bool NroffFilter::process_char (FilterChar::Chr c); + bool process_char (FilterChar::Chr c);
then repack it and continue
tar czf aspell-0.60.3.tar.gz aspell-0.60.3 make
--END-- 2006-11-23, Nicolas Mendoza <email@example.com>
ClamAV provides the basic virus protection for Zimbra.
Since the instructions on this section are wrong, I redid this section with the newest clamav.
Edit the Make file in the clamav folder to point at the new version
CLAMAV_VERSION ?= 0.88.2
The very last part of it fails because of the extra .2
sudo tar czf /home/Projects/Source/Zimbra/main/ThirdParty/clamav/builds/UNKNOWN/clamav-0.88.2.tgz clamav-0.88/
- You can keep this last part from failing if you make one further change to the makefile. Under the build target, change the configure line from this: --C. Bailey 5/14/06
Tomcat is the primary web server for the Java backends
mkdir ../jakarta-tomcat cd ../jakarta-tomcat wget http://archive.apache.org/dist/tomcat/tomcat-5/archive/v5.5.7/bin/jakarta-tomcat-5.5.7.tar.gz
cd ../mysql mkdir FC5 ln -s FC5 UNKNOWN cd FC5 wget http://download.softagency.net/MySQL/Downloads/MySQL-4.1/mysql-standard-4.1.16-pc-linux-gnu-i686-glibc23.tar.gz
Here comes the interesting part. The howto says to grab a client libs zip, that does't exist. So we need to built it ourselves:
wget http://downloads.mysql.com/archives/mysql-4.1/mysql-4.1.16.tar.gz tar xvfz mysql-4.1.16.tar.gz cd mysql-4.1.16 ./configure make cd libmysql cd .libs/ tar cvfz mysql-standard-4.1.16-clientlibs.tgz libmysqlclient.so libmysqlclient.so.14 libmysqlclient.so.14.0.0
Then copy that intothe mysql/unknown directory. From Mysql
mkdir -p /opt/zimbra (cd /opt/zimbra; \ tar xzf /home/Projects/Source/Zimbra/main/ThirdParty/mysql/UNKNOWN/mysql-standard-4.1.16-pc-linux-gnu-i686-glibc23.tar.gz) (cd /opt/zimbra/mysql-standard-4.1.16-pc-linux-gnu-i686-glibc23/lib; \ tar xzf /home/Projects/Source/Zimbra/main/ThirdParty/mysql/UNKNOWN/mysql-standard-4.1.16-clientlibs.tgz)
LDAP and the rest of the executables:
cd ../openldap wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.3.20.tgz (Wrong version in documentation)
cd ../php wget http://us2.php.net/get/php-5.0.5.tar.gz/from/this/mirror or wget http://museum.php.net/php5/php-5.0.5.tar.gz
cd ../PostFix/Postfix-2.2.5 wget http://www.mirrorspace.org/postfix/official/postfix-2.2.5.tar.gz
cd ../../sleepycat wget http://downloads.sleepycat.com/db-4.2.52.tar.gz wget http://www.sleepycat.com/update/4.2.52/patch.18.104.22.168 wget http://www.sleepycat.com/update/4.2.52/patch.22.214.171.124 wget http://www.sleepycat.com/update/4.2.52/patch.126.96.36.199 wget http://www.sleepycat.com/update/4.2.52/patch.188.8.131.52
cd ../openldap tar xzf openldap-2.2.28.tgz # cp openldap-2.2.28/build/BerkeleyDB42.patch ../sleepycat # Since we are using a later version of openldap, this file no longer appears to exist.
cd ../sleepycat tar xzf db-4.2.52.tar.gz cd db-4.2.52 patch -p0 < ../patch.184.108.40.206 patch -p0 < ../patch.220.127.116.11 patch -p0 < ../patch.18.104.22.168 patch -p0 < ../patch.22.214.171.124 # patch -p0 < ../BerkeleyDB42.patch # Couldn't find this file. ** no longer necessary as of 126.96.36.199 cd .. mv db-4.2.52 db-188.8.131.52 tar czf db-184.108.40.206.tar.gz db-220.127.116.11
|Verified Against: unknown||Date Created: 5/9/2006|
|Article ID: http://wiki.zimbra.com/index.php?title=Building_Zimbra_on_Fedora_Core_5_and_x86_64||Date Modified: 03/24/2015|