Zimbra on FreeBSD

Revision as of 21:48, 8 June 2011 by Solko (talk | contribs) (Downloads)

Developer Article

Article Information

This article applies to the following ZCS versions.

ZCS 6.0 Article ZCS 6.0

README FIRST (please, do)

Please, do not start random threads in zimbra/installation forums AND if so, please, post a link in the dedicated sticky thread AND/OR send me an email, contact me on ICQ/Skype (have a look at my forum profile for more info). Most problems can be resolved within minutes and I am subscribed only to the main thread. Keep in mind that zimbra on FreeBSD is still officially unsupported and that means you won't get (the same as Linux users would) help from zimbra team.

Most people (like myself) got tons of other activities (like family/work) so they don't have time to read excessive amount of data.

If you spot a mistake, please, let me know - I am neither psychic or omnipotent.

If anyone wonders, this is not a joke.

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.

By fetching Zimbra from zimbra.imladris.sk, you agree to Zimbra's and SUN's licensing terms. I am not good at legal stuff, screw it.

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

Zimbra does not support FreeBSD 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.

Current version and changelist can be found on Pmweb.

Patched GNR will build on FreeBSD-6+.


Please, always check zimbra FreeBSD thread for the latest news!

Patch notes for latest GNR-6.0.x

This is a complete rework of GNR source tree and it sometimes makes things better than the original. Some notable changes:

1) openssl, bdb, libtool, popt, expat, pcre, libxml2, tcmalloc are used from base system.

Rest is too Zimbra specific and would be of no other use on the system.

2) Most perl modules (100+ at the moment) are used from base system. Those left unchanged are:

Getopt::Easy - not in /usr/ports and it's not really used at all besides one tiny script (no idea why not using Getopt::Long like usual),

DBD::mysql - mysql specific includes/libs not part of base,

Net-LDAPapi - ldap/cyrus-sasl specific includes/libs not part of base,

Mail-SpamAssassin - requires different datadir.

3) FreeBSD specific includes in ZimbraBuild/defs/FreeBSD* and ZimbraBuild/defs/ThirdParty/*

4) package generation is handled by pkg_create so we install real FreeBSD specific packages.

5) complete rework of PRE-INSTALL/POST-INSTALL/DEINSTALL scripts in ZimbraBuild/rpmconf/Spec/Scripts/FreeBSD.

6) libexec/zmfixperms now fixes all needed permissions. It is called in every POST-INSTALL script.

Suggested tweaks

1) cpu spikes every minute or two:

su - zimbra
zmlocalconfig -e zmmtaconfig_interval=6000
zmprov mcf zimbraLogRawLifetime 7d
zmprov mcf zimbraLogSummaryLifetime 30d
/opt/zimbra/libexec/zmlogprocess
sed -I "" -e s'|.* \* \* \* \* /opt/zimbra/libexec/zmstatuslog|\*/60 \* \* \* \* /opt/zimbra/libexec/zmstatuslog|' /var/cron/tabs/zimbra

To do

1) create a Zimbra FreeBSD specific start-up script in /usr/local/etc/rc.d.

Troubleshooting

This is the part where opensource community unites to solve all the problems!

Please, always check zimbra FreeBSD thread when in doubt!

Common mistakes

1) /opt/zimbra symlinked elsewhere.

we all do hate /opt/zimbra directory as it spoils our nice FreeBSD tree. but, please, resist the temptation to symlink it elsewhere as that will render zimbra unusable and the installation will fail. if you need to move the it somewhere else, please, use nullfs:

zimbra# grep nullfs /etc/fstab
/usr/home/zimbra.solko  /opt/zimbra     nullfs  rw              0       0
mount_nullfs /usr/home/zimbra.solko /opt/zimbra

alternatively, switch to ZFS as you all should!

Downloads

I will try to keep this project real. If you don't see the new version here, please write me a request.

New versions require the same steps as the old ones (and little bit of brain power). When in doubt you can always browse the small zimbra repository at zimbra.imladris.sk to see the list of available files.


13) GNR-6013 (stable):

patch GNR-6013 -> GNR-6013 FreeBSD

additional stuff (optionally) needed for build process GNR-6013 -> GNR-6013 FreeBSD

GNR-6013 FreeBSD-8.2_amd64 packages

GNR-6013 FreeBSD-8.2_amd64 run dependencies (all packages) or build yourself (place this to /usr/ports/mail/)

GNR-6013 FreeBSD-8.2_amd64 build dependencies (all packages including zimbra-rundeps) or build yourself (place this to /usr/ports/mail/)


12) GNR-6012 (legacy):

patch GNR-6012 -> GNR-6012 FreeBSD


9) GNR-609 (legacy):

build guide GNR-609 FreeBSD

patch GNR-609 -> GNR-609 FreeBSD

GNR-609 source

GNR-609 FreeBSD-8.2_amd64 packages

GNR-609 FreeBSD-8.2_amd64 run dependencies (all packages) or build yourself (place this to /usr/ports/mail/)

GNR-609 FreeBSD-8.2_amd64 build dependencies (all packages including zimbra-rundeps) or build yourself (place this to /usr/ports/mail/)


8) GNR-608 (legacy):

patch GNR-608 -> GNR-608 FreeBSD

GNR-608 source

GNR-608 FreeBSD-8.1_amd64 packages

GNR-608 FreeBSD-8.1_amd64 run dependencies (all packages) or build yourself (place this to /usr/ports/mail/)

GNR-608 FreeBSD-8.1_amd64 build dependencies (all packages including zimbra-rundeps) or build yourself (place this to /usr/ports/mail/)


7) GNR-607 (legacy):

patch GNR-607 -> GNR-607 FreeBSD

GNR-607 run dependencies - build yourself (place this to /usr/ports/mail/)

GNR-607 build dependencies - build yourself (place this to /usr/ports/mail/)


6) GNR-606 (legacy):

build guide GNR-606 FreeBSD

patch GNR-606 -> GNR-606 FreeBSD

GNR-606 source

GNR-606 FreeBSD-8_amd64 packages (clamav 0.96 included)

GNR-606 FreeBSD-8_amd64 run dependencies (all packages) or build yourself (place this to /usr/ports/mail/)

GNR-606 FreeBSD-8_amd64 build dependencies (all packages including zimbra-rundeps) or build yourself (place this to /usr/ports/mail/)

GNR-606 FreeBSD-8_i386 packages (clamav 0.96 included)

GNR-606 FreeBSD-8_i386 run dependencies (all packages) or build yourself (place this to /usr/ports/mail/)

GNR-606 FreeBSD-8_i386 build dependencies (all packages including zimbra-rundeps) or build yourself (place this to /usr/ports/mail/)


GNR-605 (legacy):

patch GNR-605 -> GNR-605 FreeBSD

GNR-605 source

GNR-605 FreeBSD-8_amd64 packages

GNR-605 FreeBSD-8_amd64 run dependencies (all packages) or build yourself (place this to /usr/ports/mail/)

GNR-605 FreeBSD-8_amd64 build dependencies (all packages including zimbra-rundeps) or build yourself (place this to /usr/ports/mail/)


GNR-604 (legacy):

patch GNR-604 -> GNR-604 FreeBSD

GNR-604 FreeBSD-8_amd64 packages


GNR-603 (legacy):

patch GNR-603 -> GNR-603 FreeBSD

GNR-603 FreeBSD-7_amd64 packages

GNR-603 FreeBSD-8_amd64 packages


GNR-602 (legacy):

patch GNR-602 -> GNR-602 FreeBSD

GNR-602 FreeBSD-7_amd64 packages


GNR-601 (legacy):

build/install guide GNR-601 FreeBSD i386

build/install guide GNR-601 FreeBSD amd64

patch GNR-601 -> GNR-601 FreeBSD

GNR-601 FreeBSD-7_i386 packages

GNR-601 FreeBSD-7_amd64 packages

Known issues

1) sudo versions >= 1.7 do not work:

sudo -u zimbra -l -- -lc command

fails so please use lower version until someone finds the fix!


Please, note that this is no longer relevant for GNR-605+.


--Solko 07:57, 5 May 2011 (UTC)


Verified Against: ZCS 6.0.x on FreeBSD 7 Date Created: 10/4/2009
Article ID: https://wiki.zimbra.com/index.php?title=Zimbra_on_FreeBSD Date Modified: 2011-06-08



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search