Project

General

Profile

Support #377

Installing Zimbra 8 on FreeBSD

Added by Daniel Curtis over 10 years ago. Updated over 9 years ago.

Status:
Suspended
Priority:
High
Assignee:
Category:
Mail Server
Target version:
Start date:
04/24/2014
Due date:
% Done:

90%

Estimated time:
3.00 h
Spent time:

Description

Zimbra is one of the top contenders of Microsoft Exchange services (email, calendar, employee collaboration, etc.) in the Open Source Community. Here is a blurb from their site:

Zimbra Community is an online community and private social networking solution designed to enhance customer support and increase employee productivity.

Unfortunately, the supported Operating Systems for Zimbra are rather old (Ubuntu 12.04 / Debian 5) and it does not support FreeBSD either. I do not want to dedicate a physical box to so I have chosen to build Zimbra 8 from source in a FreeNAS Jail, which is just a FreeBSD 9.2 virtual server. This guide assumes that the server has already been setup and SSH access has been obtained.

(Option 1) Installing the unofficial binary

  • Start by refreshing the ports tree:
    portsnap fetch extract
    pkg install bash
    
  • And install a few prerequisite PERL Modules:
    pkg install p5-DBI p5-Data-UUID p5-Net-DNS-Resolver-Programmable p5-NetAddr-IP
    
  • Then build the Zimbra run dependencies from source:
    1. Download the zimbra-rundeps port from an external source (I will include a copy for posterity) and add it to the ports tree:
      mkdir /home/user/src/ && cd /home/user/src/
      wget http://zimbra.imladris.sk/download/ports/usrports_zimbra-rundeps-8.0.8.tgz
      tar xzf usrports_zimbra-rundeps-8.0.8.tgz
      cp -r zimbra-rundeps /usr/ports/net/
      
    2. Build the dependencies
      cd /usr/ports/net/zimbra-rundeps
      make install clean
      
  • Next download and install Zimbra 8.0.8 (I will include a copy for posterity)
    cd /home/user/src
    wget http://zimbra.imladris.sk/download/zimbra-packages/IRONMAIDEN-808/zcs-8.0.8_GA_6038.FreeBSD_amd64.20140410114750.tgz
    tar xzf zcs-8.0.8_GA_6038.FreeBSD_amd64.20140410114750.tgz
    cd zcs-8.0.8_GA_6038.FreeBSD_amd64.20140410114750/
    ./FreeBSD_amd64.install.sh
    y
    y
    

NOTE: This will also prompt to automagically install the zimbra-rundep dependency. Select Y to continue installing Zimbra.

Configure Zimbra

When the install finished, a prompt will appear. The admin password needs to be set before continuing:

3
4
SuperSecretPassword
r
a

When the installation finished, point a web browser at the newly create Zimbra server and login using the admin credentials provided during configuration.

NOTE: To download the Desktop Client Applications, go to http://zimbra.example.com/downloads/index.html.

This method worked to get Zimbra installed; the following versions are recorded in hopes to documents building Zimbra fully from source.

(Option 2) Building Zimbra from git source

WARNING: I have yet been able to successfully build Zimbra from source on FreeBSD 9.2.

  • To begin, we need to install some dependencies.
    pkg install git bash wget p5-DBI p5-Data-UUID p5-Net-DNS-Resolver-Programmable p5-NetAddr-IP libltdl
    
  • Next refresh the ports tree:
    portsnap fetch extract
    pkg install bash
    

Add the Zimbra git development keys:

  • Obtain the git ssh access keys
    mkdir -p /tmp/zimbra-git
    cd /tmp/zimbra-git
    wget http://files2.zimbra.com/downloads/git-fusion/zimbra-git-ssh.tgz
    tar xfz zimbra-git-ssh.tgz
    
  • Add the access keys to your own user account:
    cd ~/.ssh
    cp /tmp/zimbra-git/id_rsa_git* .
    
  • Add the following ~/.ssh/config. Create the file if it doesn't exist:
    Host zimbra-git
      User public
      Hostname git.zimbra.com
      IdentityFile ~/.ssh/id_rsa_git
      IdentitiesOnly yes
      Port 1067
    

Build the Zimbra dependencies from source:

  • Download the zimbra-builddeps port from an external source (I will include a copy for posterity) and add it to the ports tree:
    portsnap fetch extract
    cd /usr/ports/mail
    wget http://zimbra.imladris.sk/download/ports/usrports_zimbra-builddeps-8.0.8.tgz
    wget http://zimbra.imladris.sk/download/ports/usrports_zimbra-rundeps-8.0.8.tgz
    tar xzf usrports_zimbra-builddeps-8.0.8.tgz
    tar xzf usrports_zimbra-rundeps-8.0.8.tgz
    
  • Build the Zimbra build dependencies
    cd /usr/ports/mail/zimbra-builddeps
    make install clean
    
  • Build the Zimbra run dependencies
    cd /usr/ports/mail/zimbra-rundeps
    make install clean
    
  • Next download the current release of Zimbra:
    mkdir ~/git
    cd ~/git
    git clone git@zimbra-git:zimbra-foss
    

    NOTE: This took nearly 12GB of storage, so be forewarned.
  • Change the current branch to the most current stable version
    cd ~/git/zimbra-foss
    git checkout ironmaiden-foss
    
  • Then download the FreeBSD patch for Zimbra and patch the install:
    cd ~/git
    wget http://zimbra.imladris.sk/download/patches/IRONMAIDEN-808-FreeBSD.patch
    cd zimbra-foss
    patch -p1 -s < ../IRONMAIDEN-808-FreeBSD.patch
    chmod 755 ZimbraBuild/rpmconf/Spec/Scripts/FreeBSD/*
    mkdir /opt/zimbra
    chown zimbra:zimbra /opt/zimbra
    
  • Download the Java Cryptographic Extension
    mkdir -p ~/git/zimbra-foss/ThirdPartyBuilds/i386/java/jce
    mkdir ~/jce && cd ~/jce
    cp /path/to/jce_policy-6.zip
    unzip jce_policy-6.zip
    cp -r ~/jce ~/git/zimbra-foss/ThirdPartyBuilds/i386/java/
    
  • Compile and install Zimbra
    cd ~/git/zimbra-foss/ZimbraBuild
    ./buildZCS.sh -t
    

This will begin a process to automatically resolve any further dependencies.

  • I used the following CPAN repository, since I am not a fan of yahoo (the default):

http://ftp.osuosl.org/pub/CPAN/

Resources


Files

usrports_zimbra-builddeps-8.0.8.tgz (1.31 KB) usrports_zimbra-builddeps-8.0.8.tgz zimbra-builddeps Daniel Curtis, 04/25/2014 01:28 PM
zcs-8.0.8-FreeBSD-9_amd64.tgz (670 MB) zcs-8.0.8-FreeBSD-9_amd64.tgz Zimbra 8.0.8 FreeBSD binaries Daniel Curtis, 04/25/2014 01:31 PM
jce_policy-6.zip (8.89 KB) jce_policy-6.zip Daniel Curtis, 07/27/2014 07:53 PM
IRONMAIDEN-808-FreeBSD.patch (140 KB) IRONMAIDEN-808-FreeBSD.patch Zimbra 8.0.8 CE Source FreeBSD patch Daniel Curtis, 08/08/2014 12:41 PM
usrports_zimbra-rundeps-8.0.8.tgz (1.24 KB) usrports_zimbra-rundeps-8.0.8.tgz Zimbra 8.0.8 FreeBSD runtime dependencies for the ports tree Daniel Curtis, 08/08/2014 01:33 PM
#1

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • Priority changed from Normal to High
  • % Done changed from 100 to 50
#2

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
  • % Done changed from 50 to 80
#3

Updated by Daniel Curtis over 10 years ago

#4

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#5

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#6

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#7

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#8

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
  • Status changed from Closed to In Progress
#9

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#10

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#11

Updated by Daniel Curtis over 10 years ago

So far I have been unable to compile Zimbra Collaboration Suite from source. This is due to my lack of being able to hack the makefiles to support the FreeBSD packaging system.

For the time being, I am going to move building Zimbra from source on an Ubuntu Jail, and if that fails I will be dedicate a full virtual machine to this.

The first method for installing Zimbra using the provided packages works, however I want to be able to build my production systems from source.

#12

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#14

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
  • % Done changed from 80 to 90
#15

Updated by Daniel Curtis over 10 years ago

  • Project changed from 89 to FreeBSD Administration
#17

Updated by Daniel Curtis over 10 years ago

  • Description updated (diff)
#18

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
#19

Updated by Daniel Curtis almost 10 years ago

  • Target version set to FreeBSD 9
#20

Updated by Daniel Curtis almost 10 years ago

  • Subject changed from Installing Zimbra 8 on FreeBSD 9.2-RELEASE to Installing Zimbra 8 on FreeBSD
  • Category set to Mail Server
#21

Updated by Daniel Curtis over 9 years ago

  • Status changed from In Progress to Suspended

Also available in: Atom PDF