Support #377
Updated by Daniel Curtis over 10 years ago
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.
h2. (Option 1) Building using the ports tree
* Start by refreshing the ports tree:
<pre>
portsnap fetch
portsnap extract
pkg install bash
</pre>
* And install a few prerequisite PERL Modules:
<pre>
pkg install p5-DBI p5-Data-UUID p5-Net-DNS-Resolver-Programmable p5-NetAddr-IP
</pre>
* Then 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:
<pre>
mkdir /home/user/src/zimbra-builddeps && cd /home/user/src/zimbra-builddeps
wget http://zimbra.imladris.sk/download/ports/usrports_zimbra-builddeps-8.0.8.tgz
tar xzf usrports_zimbra-builddeps-8.0.8.tgz
cp -r zimbra-builddeps /usr/ports/net/
</pre>
*# Build the dependencies
<pre>
cd /usr/ports/net/zimbra-builddep
make install clean
</pre>
* Next download and install Zimbra 8.0.8 (I will include a copy for posterity)
<pre>
cd /home/user/src
wget http://zimbra.imladris.sk/download/zimbra-packages/IRONMAIDEN-808/zcs-8.0.8-FreeBSD-9_amd64.tgz
tar xzf zcs-8.0.8-FreeBSD-9_amd64.tgz
cd zcs-8.0.8_GA_6038.FreeBSD_amd64.20140410114750/
./FreeBSD_amd64.install.sh
y
y
</pre>
NOTE: This will also prompt to automagically install the zimbra-rundep dependency. Select Y to continue installing Zimbra.
h3. Configure Zimbra
When the install finished, a prompt will appear. The admin password needs to be set before continuing:
<pre>
3
4
SuperSecretPassword
r
a
</pre>
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.
h2. (Option 2) Building Zimbra from git source
* To begin, we need to install some dependencies.
<pre>
pkg install git bash wget p5-DBI p5-Data-UUID p5-Net-DNS-Resolver-Programmable p5-NetAddr-IP
</pre>
* Next refresh the ports tree:
<pre>
portsnap fetch
portsnap extract
pkg install bash
</pre>
h3. Add the Zimbra git development keys:
* Obtain the git ssh access keys
<pre>
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
</pre>
* Add the access keys to your own user account:
<pre>
cd ~/.ssh
cp /tmp/zimbra-git/id_rsa_git* .
</pre>
* Add the following @~/.ssh/config@. Create the file if it doesn't exist:
<pre>
Host zimbra-git
User public
Hostname git.zimbra.com
IdentityFile ~/.ssh/id_rsa_git
IdentitiesOnly yes
Port 1067
</pre>
h3. 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:
<pre>
mkdir /home/user/src/zimbra-builddeps && cd /home/user/src/zimbra-builddeps
wget http://zimbra.imladris.sk/download/ports/usrports_zimbra-builddeps-8.0.8.tgz
tar xzf usrports_zimbra-builddeps-8.0.8.tgz
cp -r zimbra-builddeps /usr/ports/net/
</pre>
* Build the dependencies
<pre>
cd /usr/ports/net/zimbra-builddep
make install clean
</pre>
* Next download the current release of Zimbra:
<pre>
mkdir ~/git
cd ~/git
git clone git@zimbra-git:zimbra-foss
</pre>
NOTE: This took nearly 12GB of storage, so be forewarned.
* Change the current branch to the most current stable version
<pre>
cd ~/git/zimbra-foss
git checkout ironmaiden-foss
</pre>
* Download the "Java Cryptographic Extension":http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
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/
h2. Resources
* https://wiki.zimbra.com/wiki/Zimbra_on_FreeBSD
* http://www.zimbra.com/forums/installation/61938-ironmaiden-8-0-3-ported-freebsd-2.html
* https://wiki.zimbra.com/wiki/Building_Zimbra_using_Git
* http://wiki.zimbra.com/wiki/Building_IRONMAIDEN_8.0.3_on_FreeBSD_9.1_amd64