Step by step Zimbra on Ubuntu 6.06
Next post: Grif gets an upgrade
Here's how I set up my Zimbra colaboration suite on Ubuntu 6.06 Server Edition.
Why not 7.10 or some later version? Zimbra only officially supports 6.06 because it is a LTS version. I believe 8.04 is going to be the next LTS version out, and will be supported by Zimbra. As a side note, it is possible to trick Zimbra into installing on non-LTS versions, but when I did this I found certain things didn't quite work properly (and its harder to fix any problems).
Preliminary setup
Zimbra is a mail server, and as such requires that at least one domain's MX record resolves to it. For each domain you want Zimbra to recieve mail for you will need to set the MX to the IP address of the server. You can do this via your domain's control panel with your ISP.
Set up your server
Zimbra really should be on its own server for two main reasons: first, it uses quite a lot of CPU power, and second, it installs its own modified versions of Apache, MySQL, Postfix, and other programs. These will clash with any others you have set up. So go ahead and pop your fresh Ubunutu 6.06 Server Edition CD in and start that server. You can download it directly from here if you do not already have it.
Select "Install to hard disk" (don't chose the LAMP server option!) and set all your values to your liking. For now it is fine to leave the server getting its IP address via DHCP as we'll change that later. Give your server a nice name - I called mine Lopez (from Red vs Blue) and I'll be refering to that name in my commands. Just change the name as required. For the partitioning you can either select "Use entire hard disk and set up LVM", or if you're feeling confident you can partition manually. You will want LVM as a minimum if you are using the OSS version of Zimbra so that you can perform backups with as little downtime as possible. Zimbra is installed to /opt/zimbra, so you may wish to create a separate LVM partition for /opt to reduce snapshot time.
Once your server has been installed and restarted, it is time to prep your server. First of all, we need to make sure it is up to date with the latest patches. First edit the apt sources file and comment out (put a # at the start) the line starting with "deb cdrom:'
sudo nano /etc/apt/sources.list
Now do your updates
sudo apt-get update && sudo apt-get dist-upgrade
This will probably take a wee while depending on your internet connection, and the amount of updates. When I did this, a new kernel was downloaded and installed, so although not required I like to restart my server to take advantage of that new kernel immediately.
sudo shutdown -r now
Once this is complete, we need to make our server permanently accesible via the network and internet. For this, we need a few things: a static IP address, and a DNS record. First off, lets make our server have a static IP address. If you don't know what the various parts mean, you should probably find a basic tutorial on linux networking before attempting this install. On Ubuntu you edit the network settings by typing
sudo nano /etc/network/interfaces
You'll need to change your iface definition from auto to static. Here's how mine looks
.... # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 ...
Apply these settings by restarting your network interfaces
sudo /etc/init.d/networking restart
Next, add your server's address to your local DNS server. If you don't have a DNS server you'll just have to access the server using it's IP address.
Optionally you may prefer not to access your server via the local console all the time. The alternative is to use SSH, and access the console from your desktop machine (or another server). To set this up is easy
sudo apt-get install openssh-server
Now you can access your server by opening up a terminal shell on your desktop (or PuTTY if you use Windows) and connect to your server remotely.
ssh al@lopez
This shell now acts as if you were actually infront of the server. Now you can read this tutorial and type your commands from the same computer! :)
We need to install a few more programs and libraries to make sure we can run Zimbra properly.
sudo apt-get install perl libidn11 curl fetchmail libpcre3 libgmp3c2 libexpat1 libxml2 libstdc++5 openssl libltdl3
Install Zimbra
Next we need to get Zimbra onto our server. If you have already downloaded it you can transfer the file to your server using sftp (sftp is part of ssh) - otherwise you can download it straight from the web site.
wget http://files.zimbra.com/downloads/5.0.0_GA/zcs-5.0.0_GA_1869.UBUNTU6.20071218195304.tgz
Note that this version might not be the current one. You can see the available versions at http://www.zimbra.com/community/downloads.html. Just replace the link and filename with the relevant version. It's fine to just download and extract it into your home directory - you can remove the files after installation if you wish. Now extract the files.
tar xvzf zcs-5.0.0_GA_1869.UBUNTU6.2007.1218195304.tgz
Navigate into the zcs directory
cd /zcs
Now run the install script
sudo ./install.sh
Agree to the licence, and then say yes to installing zimbra-ldap, zimbra-logger, zimbra-mta, zimbra-snmp, zimbra-store and zimbra-spell (just press Enter). Finally, type 'Y' and Enter to start the installation. This bit will take quite a long time.
Most likely you will get an error message part way through installation saying something along the lines of
DNS ERROR resolving MX for lopez.hol.net.local It is suggested that the domain name have an MX record configured in DNS Change domain name? [Yes]
Agree to the change and enter in the primary domain that you will be recieving mail for. In my case it is hol.net.nz. Enter in your value, and Zimbra will check that it is listed as a MX record for that domain.
Now you are presented with a configuration menu. You only need to address the items marked ** (namely the Admin Password), but feel free to explore some of the other options. Set the admin password by typing 7, Enter, 4, Enter, then press r to return to the main menu and a to apply. Agree to saving the config data to file, and leave the config file as is. Continue with modifing the system, and the setup will resume.
You can choose to notify Zimbra of your installation - this helps the Zimbra guys see how popular their work is. They don't generally bug you about anything if you do this step, but its up to you. After you do or skip this, the servers start.
Congratulations, you're all done! For more info about how to actually use the Zimbra suite, check out their website.