Difference between revisions of "Zimbra on FreeBSD"

Line 11: Line 11:
  
 
At this point it's good to note that everything should be run as root unless stated otherwise.
 
At this point it's good to note that everything should be run as root unless stated otherwise.
 +
 
==Getting the source via Perforce==
 
==Getting the source via Perforce==
 
You need to install [http://www.perforce.com/ Perforce] either from /usr/ports:
 
You need to install [http://www.perforce.com/ Perforce] either from /usr/ports:
Line 33: Line 34:
 
p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-601/...
 
p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-601/...
 
</pre>
 
</pre>
The source is about 587 MB so it may take some time if you are sitting in the middle of Alaska.
+
The source is about 587 MB so it may take some time if you are sitting in the middle of [http://en.wikipedia.org/wiki/Alaska Alaska].
 +
 
 
==Getting the source from my repository==
 
==Getting the source from my repository==
 
[http://zimbra.imladris.sk/download/src/GNR-601-src.tar.gz GNR-601-src.tar.gz]
 
[http://zimbra.imladris.sk/download/src/GNR-601-src.tar.gz GNR-601-src.tar.gz]
Line 41: Line 43:
 
tar vxzf GNR-601-src.tar.gz
 
tar vxzf GNR-601-src.tar.gz
 
</pre>
 
</pre>
The unpacked source is about 587 MB so it may take some time if you aren't sitting on Gigabit line.
+
The unpacked source is about 587 MB so it may take some time if you aren't sitting on [http://en.wikipedia.org/wiki/Gigabit_Ethernet gigabit line].
 +
 
 +
==Initial pre-build steps==
 +
Let's check our system:
 +
<pre>
 +
solko@[blurp /home/public/p4/GNR-601] # uname -a
 +
FreeBSD blurp.euba.sk 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Sun Oct  4 10:52:43 CEST 2009 
 +
</pre>
 +
 
 +
Let's check our /etc/make.conf:
 +
<pre>
 +
solko@[blurp /home/public/p4/GNR-601] # cat /etc/make.conf
 +
COPTFLAGS= -O2 -pipe
 +
CFLAGS= -O2 -fno-strict-aliasing -pipe
 +
CPUTYPE?=core2
 +
</pre>
 +
 
 +
==Preparing build enviroment via /usr/ports==
 +
I created a simple "meta" ports which will take care of everything. Since I am a very very creative person I named those:
 +
[http://zimbra.imladris.sk/download/ports/usrports_zimbra-rundeps.tar.gz mail/zimbra-rundeps]
 +
and
 +
[http://zimbra.imladris.sk/download/ports/usrports_zimbra-builddeps.tar.gz mail/zimbra-builddeps].
 +
 
 +
The first installs all dependencies needed to run GNR-601 while the second installs all dependencies needed to build GNR-601. For reasons vastly uknown the second requires the first one.
 +
 
 +
<pre>
 +
cd /usr/ports/mail
 +
fetch http://zimbra.imladris.sk/download/ports/usrports_zimbra-rundeps.tar.gz && \
 +
    tar vxzf usrports_zimbra-rundeps.tar.gz && \
 +
        rm -f usrports_zimbra-rundeps.tar.gz
 +
fetch http://zimbra.imladris.sk/download/ports/usrports_zimbra-builddeps.tar.gz && \
 +
    tar vxzf usrports_zimbra-builddeps.tar.gz && \
 +
        rm -f usrports_zimbra-builddeps.tar.gz
 +
cd /usr/ports/mail/zimbra-rundeps && make config-recursive install distclean
 +
cd /usr/ports/mail/zimbra-builddeps && make config-recursive install distclean
 +
</pre>
 +
If you are able to use /usr/ports you should be able to figure out the configure options (not that it matters much, mostly unimportant stuff). Be warned that GNR-601 requires jdk15 to build while requiring jdk16 to run so you will end up having both. Building diablo-jdk requires downloading java stuff. How boring!
 +
There are also those 64 perl modules..
 +
 
 +
==Preparing build enviroment via my repository==
 +
Since some people likes to compile (me me me!) and others like to install-only I built all the neccessary [http://zimbra.imladris.sk/download/packages/GNR/FreeBSD-7.2/FreeBSD-7.2_amd64_packages.tar.gz packages].
 +
 
 +
<pre>
 +
cd /tmp && mkdir -p DELME && cd DELME && fetch http://zimbra.imladris.sk/download/packages/GNR/FreeBSD-7.2/FreeBSD-7.2_amd64_packages.tar.gz
 +
tar vxzf FreeBSD-7.2_amd64_packages.tar.gz && cd amd64
 +
pkg_add zimbra-builddeps-6.0.1.tbz
 +
</pre>
 +
You need to accept diablo-jdk license twice (jdk15+jdk16).
 +
 
 +
Grats, you just saved yourself a lot of time.
 +
 
 
==Building Zimbra Collaboration Suite: "GNR-601"==
 
==Building Zimbra Collaboration Suite: "GNR-601"==
 
GNR-601 is the latest 6.0 series release. Current version & changelist can be found on [http://pm.zimbra.com/pm_release.php?rel=6.0 Pmweb]
 
GNR-601 is the latest 6.0 series release. Current version & changelist can be found on [http://pm.zimbra.com/pm_release.php?rel=6.0 Pmweb]

Revision as of 23:08, 4 October 2009

General Information

The perforce cache gives users access to download and build/modify Zimbra source code for Open Source products. Building Zimbra Collaboration Suite from Zimbra's Perforce cache requires advanced knowledge of troubleshooting. It is not available for Network Edition components. Changes cannot be committed to the Perforce cache.

By building Zimbra, you agree to Zimbra's licensing terms. Building from source is not covered under the ZEUL, unlike pre-compiled binaries, but rather the YPL.

Technical support for source building can be found in the Zimbra Developers forum.

This guide describes building and installing zimbra-6.0.0+ (GNR) on FreeBSD-7.2_amd64. Trying to install on a different version (that means older than 7.2-RELEASE) is not advised and not covered.

Zimbra does not support FreeBSD operating system out of the box and there are no plans for the future support (or so we all heard). I tried to integrate FreeBSD into source tree as much as possible so the same version should compile fine on other supported systems.

At this point it's good to note that everything should be run as root unless stated otherwise.

Getting the source via Perforce

You need to install Perforce either from /usr/ports:

cd /usr/ports/devel/perforce && make install distclean

or fetch perforce package from my repository:

fetch http://zimbra.imladris.sk/download/packages/GNR/FreeBSD-7.2/amd64/perforce-08.2_5,1.tbz
pkg_add perforce-08.2_5,1.tbz

If you are using a csh derivate shell, which is the FreeBSD default, run:

rehash

Get the source:

setenv P4PORT codes.zimbra.com:2666
mkdir -p /home/public/p4
p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-601/...

The source is about 587 MB so it may take some time if you are sitting in the middle of Alaska.

Getting the source from my repository

GNR-601-src.tar.gz

mkdir -p /home/public/p4 && cd /home/public/p4
fetch http://zimbra.imladris.sk/download/src/GNR-601-src.tar.gz
tar vxzf GNR-601-src.tar.gz

The unpacked source is about 587 MB so it may take some time if you aren't sitting on gigabit line.

Initial pre-build steps

Let's check our system:

solko@[blurp /home/public/p4/GNR-601] # uname -a
FreeBSD blurp.euba.sk 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Sun Oct  4 10:52:43 CEST 2009  

Let's check our /etc/make.conf:

solko@[blurp /home/public/p4/GNR-601] # cat /etc/make.conf
COPTFLAGS= -O2 -pipe
CFLAGS= -O2 -fno-strict-aliasing -pipe
CPUTYPE?=core2

Preparing build enviroment via /usr/ports

I created a simple "meta" ports which will take care of everything. Since I am a very very creative person I named those: mail/zimbra-rundeps and mail/zimbra-builddeps.

The first installs all dependencies needed to run GNR-601 while the second installs all dependencies needed to build GNR-601. For reasons vastly uknown the second requires the first one.

cd /usr/ports/mail
fetch http://zimbra.imladris.sk/download/ports/usrports_zimbra-rundeps.tar.gz && \
    tar vxzf usrports_zimbra-rundeps.tar.gz && \
        rm -f usrports_zimbra-rundeps.tar.gz
fetch http://zimbra.imladris.sk/download/ports/usrports_zimbra-builddeps.tar.gz && \
    tar vxzf usrports_zimbra-builddeps.tar.gz && \
        rm -f usrports_zimbra-builddeps.tar.gz
cd /usr/ports/mail/zimbra-rundeps && make config-recursive install distclean
cd /usr/ports/mail/zimbra-builddeps && make config-recursive install distclean

If you are able to use /usr/ports you should be able to figure out the configure options (not that it matters much, mostly unimportant stuff). Be warned that GNR-601 requires jdk15 to build while requiring jdk16 to run so you will end up having both. Building diablo-jdk requires downloading java stuff. How boring! There are also those 64 perl modules..

Preparing build enviroment via my repository

Since some people likes to compile (me me me!) and others like to install-only I built all the neccessary packages.

cd /tmp && mkdir -p DELME && cd DELME && fetch http://zimbra.imladris.sk/download/packages/GNR/FreeBSD-7.2/FreeBSD-7.2_amd64_packages.tar.gz
tar vxzf FreeBSD-7.2_amd64_packages.tar.gz && cd amd64
pkg_add zimbra-builddeps-6.0.1.tbz

You need to accept diablo-jdk license twice (jdk15+jdk16).

Grats, you just saved yourself a lot of time.

Building Zimbra Collaboration Suite: "GNR-601"

GNR-601 is the latest 6.0 series release. Current version & changelist can be found on Pmweb


Troubleshooting

Huh. Problems? Why?

--Solko 22:36, 4 October 2009 (UTC)

Jump to: navigation, search