Thursday, July 19, 2007

Zimbra 4.5.6 + Ubuntu 7.04

How to Install Zimbra (4.5.6) on Ubuntu Feisty


Zimbra Collaboration Suite (ZCS) is a groupware product created by Zimbra Inc, located in California, USA. It consists of both client and server components. There are two versions of Zimbra available: an open-source version, which is supported by the community, and a commercially supported version with closed-source components. In this article, I'll try to explain how to install the free (open-source) version of ZCS on an Ubuntu system Festy although Ubuntu Feisty is not supported at this time.

So what's ZCS more exactly? ZCS is a full-featured collaboration suite, which supports email and group calendars using an Ajax web interface that enables tool tips, draggable items and right click menus in the user interface. There are also some advanced searching capabilities included, as well as date relations, online document authoring and a full administration interface. The ZCS server works well with many open source projects such as Postfix, MySQL, OpenLDAP and it also acts as an IMAP and POP3 server.

That's why if you want install Zimbra you have to stop Postfix, MySQL, OpenLDAP, Apache 2, Tomcat and any other server application that could conflict with it.
You could also have some problem if there is a firewall installed, better disable it too. So first stop:

SHELL

sudo /etc/init.d/postifix stop
sudo /etc/init.d/mysql stop
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/openldap stop

These and the other related services (like Tomcat or Spamassassin).

SHELL

sudo update-rc.d -f mysql remove
sudo update-rc.d -f apache2 remove
sudo update-rc.d -f postfix remove
sudo update-rc.d -f openldap remove

Following the Zimbra Installation Manual finally i could install the Collaboration Suite:

SHELL

tar xzvf zcs-4.5.6_GA_1044.UBUNTU6.tgz
cd zcd
sudo apt-get install curl fetchmail libpcre3 libgmp3c2 libexpat1 libxml2 libtie-ixhash-perl
sudo ./install.sh

You could experience some problem with dependencies:

OUTPUT

Checking for prerequisites...

NPTL...FOUND

sudo...MISSING
libidn...MISSING

curl...MISSING

fetchmail...MISSING

gmp...MISSING
/usr/lib/libstdc++.so.5...FOUND

###ERROR###
One or more prerequisite packages are missing.
Please install them before running this installer.
Installation cancelled.

You can go crazy searching the dependencies, but you hava the problem is not specific to dependencies.
The dependencies check can not be execute correctly, because the Zimbra Get Platform Tag script in the installation procedure.
The trick is modify the /etc/lsb-release:

SHELL

$ sudo vi /etc/lsb-release


inside you'll find something like this:

/etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.04

DISTRIB_CODENAME=feisty
DISTRIB_DESCRIPTION="Ubuntu 7.04"

and correct this:

DISTRIB_RELEASE=7.04


in this:

DISTRIB_RELEASE=6.04


now you can continue with the installation and the prerequisites check will return success:

OUTPUT
Checking for prerequisites...
NPTL...FOUND
sudo...FOUND sudo-1.6.8p12-4ubuntu5
libidn11...FOUND libidn11-0.6.5-1build1
curl...FOUND curl-7.15.5-1ubuntu2.1
fetchmail...FOUND fetchmail-6.3.6-1ubuntu2
libpcre3...FOUND libpcre3-6.7-1ubuntu2
libgmp3c2...FOUND libgmp3c2-2:4.2.1+dfsg-4build1
libexpat1...FOUND libexpat1-1.95.8-3.4build1
libxml2...FOUND libxml2-2.6.27.dfsg-1ubuntu3
libstdc++6...FOUND libstdc++6-4.1.2-0ubuntu4
libstdc++5...FOUND libstdc++5-1:3.3.6-15ubuntu1
openssl...FOUND openssl-0.9.8c-4build1


Anyway the installation problems I found wasn't terminated.
Starting the installation process, the manual show how to modify the hosts file.
ZCS Single Server Quick Start, Network Edition 4.5: "Make sure that FQDN entry in /etc/hosts appear before the hostnames. If this is missing, the creation of the Zimbra certificate fails. The FQDN entry should look like this example."

/etc/hosts
127.0.0.1 localhost.localdomain localhost
your.ip.address FQDN yourhostname


This is an important moment of installation. If you specify there the public ip address of your FQDN but the mail server don't bind directly this ip address, because it is behind a firewall, you could have a big problem after, when the openldap server starts and try to bind the 389 port on that address. In other words, the installation won't continue, because openldap can't start. And there isn't any damn error message that help you to understand that!
So I specified in the hosts file the Ip address of network interface on internet.
But another choice is to change the ip address used by openldap, and you have to do that using the zimbra user:

SHELL

zmlocalconfig -e ldap_url=ldap://0.0.0.0:389



Looking at installation log I found this error:

/opt/zimbra/bin/zmfixperms.sh: No such file or directory


This works:

sudo /opt/zimbra/libexec/zmfixperms

When everything seems up and running, finally you could try to connect at the administration panel. Well, I don't understood why, but the admin password won't work.
To specify a new password you have to submit this command as zimbra user:

SHELL

zmprov sp admin@domain.name password


I hope this can help to enjoy this wonderful suite.