Zimbra on a VPS: Step-by-Step
Here is a step-by-step how-to for getting
Zimbra Collaboration Suite installed on a XEN-based virtual machine/virtual private server running on Linux with limited resources. I am going to use a hosted VPS from
Linode for this example. Based on the forum discussions at Zimbra.com, depending on the setup, running Zimbra on a VPS/VM can sometimes cause problems, especially with libc calls. But, this setup seems to have worked fine for me for about 5 months so far and I figured I share.
BTW: I have no relation to Zimbra/Yahoo. So, it should be noted that neither Zimbra or myself directly support Zimbra in the open source variety. In short: I hope this helps, and good luck!
Pre-Installation Checklist
• $30
• A few hours
• Some familiarity with UNIX
• A domain name, for which you have control of an 'A' and MX DNS record.
Step 1: Set your DNS forward records
Before getting too into the VM setup, you will need to establish a domain name to use both as your web front-end and as your mail delivery host (MX). First, modify a forward DNS record for your domain to point toward your Linode IP. This step is accomplished at the site of whoever either manages your DNS or at the DNS server that serves your domain name. This forward DNS record will become the DNS name of your Zimbra front-end. The A record can be anything you like, such as mail.mydomain.com. Create an 'A' DNS record for your domain to point toward the IP address of your new Linode. Then, also modify the MX record for your domain to also point toward this IP. Point your MX record toward the name you chose for the A record. I.e. A=mail.mydomain.com=[your linode ip], MX=mail.mydomain.com.
In this example, I have used the domain name 'mail.develo.com' for both my 'A' and 'MX' DNS records.
Step 2: Setting up your Linode
The
Linode 540 seems to be sized just right for a minimum install. Once you have completed the VPS purchase, and have a login to the linode site, you should see a screen in your account called 'dashboard' that looks like:

Select a Debian 4.0 distribution, then provision your disk so that you have a 1000MB swap, and use the rest for the main root partition. Zimbra will certainly eat all of your 540MB of ram (even with scaling down) and may potentially eat up some swap space too, so it is good to have this a bit big. Next set the password that will be become your root password.

Wait for your installation to be built (a few minutes), then click 'Boot'
Step 3: Set a reverse DNS pointer for your new IP
In the Linode 'members' area, there is a tab called 'utilities'. Click on the reverse DNS manager and put in the host name that matches your A/MX record that you set above. The linode.com site needs to see a forward record that is pointing to your IP for this step to work, so it may take a while for your DNS changes made above to propagate and for the Linode to pick up the changes. Until the forward DNS changes are viewable by the Linode.com DNS servers, Linode will not allow you to complete this step.
Step 4: Connect to your Linode
Now connect to your Linode IP address using an SSH client. If you do not have an SSH client, here is a good one for Windows:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Connect as user 'root', using the password that you specified while creating your Debian distribution.
Step 5: Change your Linode hostname
After you are connected via SSH, the first order of business will be to change the hostname to match your DNS record, here, I'm using the example domain 'mail.develo.com'. To change your host name, simple do the 2 command below. The first writes the name of the machine to a file, the second sets the name.
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# echo 'mail.develo.com' > /etc/hostname
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# /etc/init.d/hostname.sh start
Setting hostname to 'mail.develo.com'...done.
Step 6: Reboot your Linode
Now, let's reboot the Linode to verify that the hostname change is in-place at boot-up. You may need to go back to your linode.com dashboard to start your linode if it does not come back automatically.
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# sync
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# reboot
Step 7: Update your package sources
Update your Debian package sources with the command 'apt-get update'
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/util# apt-get update
Get:1 http://ftp.us.debian.org stable Release.gpg [378B]
Get:2 http://ftp.us.debian.org stable Release [58.2kB]
Get:3 http://security.debian.org stable/updates Release.gpg [189B]
Get:4 http://security.debian.org stable/updates Release [37.6kB]
Ign http://ftp.us.debian.org stable/main Packages/DiffIndex
Ign http://ftp.us.debian.org stable/main Sources/DiffIndex
Get:5 http://ftp.us.debian.org stable/main Packages [4280kB]
Ign http://security.debian.org stable/updates/main Packages/DiffIndex
Get:6 http://security.debian.org stable/updates/main Packages [257kB]
Get:7 http://ftp.us.debian.org stable/main Sources [1214kB]
Fetched 5848kB in 6s (959kB/s)
Reading package lists... Done
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/util#
Step 8: Upgrade your packages
This command will upgrade your Linux distribution to have current versions of all libraries and programs. You may be asked to restart a few daemons such as ssh, continue with the defaults if asked.
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/util# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
bsdutils cpio debconf debconf-i18n debian-archive-keyring e2fslibs e2fsprogs findutils libblkid1 libcomerr2 libkrb53 libpam-modules
libpam-runtime libpam0g libpcre3 libss2 libssl0.9.7 libssl0.9.8 libuuid1 lsb-base mount nano tar tzdata util-linux
25 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.1MB of archives.
After unpacking 1163kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://ftp.us.debian.org stable/main bsdutils 1:2.12r-19etch1 [68.5kB]
Get:2 http://ftp.us.debian.org stable/main e2fslibs 1.39+1.40-WIP-2006.11.14+dfsg-2etch1 [87.2kB]
Get:3 http://security.debian.org stable/updates/main libkrb53 1.4.4-7etch5 [408kB]
...
...
Step 9: Install packages required by Zimbra
Install these packages (with libc6-xen last) using the apt-get command as follows:
mail:~# apt-get install file
...
mail:~# apt-get install sudo
...
mail:~# apt-get install fetchmail
...
mail:~# apt-get install libgmp3c2
...
mail:~# apt-get install libxml2
...
mail:~# apt-get install libexpat1
...
mail:~# apt-get install openssl
...
mail:~# apt-get install libltdl3
...
mail:~# apt-get install perl5
...
mail:~# apt-get install libc6-xen
...
Step 10: Stop the default Debian email daemon
The Debian package at Linode.com comes with a default email daemon (exim). This runs by default and will conflict with Zimbra unless disabled before installation. To disable exim, comment out the the line that starts with 'smtp' in /etc/inetd.conf using an editor such as vi or pico (i.e.: 'pico -w /etc/inetd.conf').
#:MAIL: Mail, news and uucp services.
#smtp stream tcp nowait mail /usr/sbin/exim exim -bs
Now, restart the inetd daemon by issuing the command below:
mail:~# /etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd.
Step 11: Download Zimbra to your Linode
Find the HTTP link for 'Debian 4 x86' version of Open Source Zimbra at:
http://www.zimbra.com/community/downloads.html. Save the link location, SSH into your Linode as root and use wget to grab the distribution using the link that you copied. Then 'gunzip' the distribution and 'untar' the tarball as shown.
mail:~# wget http://files.zimbra.com/downloads/5.0.4_GA/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307.tgz
...
...
mail:~# gunzip ./zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307.tgz
mail:~# tar -xvf ./zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307.tar
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/packages/
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/packages/zimbra-mta_5.0.4_GA_2101.DEBIAN4.0_i386.deb
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/packages/zimbra-spell_5.0.4_GA_2101.DEBIAN4.0_i386.deb
...
...
Step 12: Start the installer
The Zimbra installer is very easy, but has alot of output, so I've only included the steps that require input:
mail:~# cd zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# ./install.sh
...
...
Install zimbra-ldap [Y]
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-proxy [N]
...
...
The system will be modified. Continue? [N] y
...
...
Address unconfigured (**) items (? - help) 3
...
...
Select, or 'r' for previous menu [r] 4
...
Password for admin@mail.develo.com (min 6 characters): [Kj77DUf9]
...
...
Select, or 'r' for previous menu [r] r
...
...
*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.5961]
...
...
The system will be modified - continue? [No] yes
...
...
Notify Zimbra of your installation? [Yes]
...
...
Configuration complete - press return to exit
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307#
Step 13: Congrats!: Zimbra should now be running!
http://yourdomain.com

To get to the administration URL goto:
https://yourdomain.com:7071
There are tons of great people and lots of reference material here:
http://www.zimbra.com/forums/
Next see: Zimbra on a VPS: Tuning to reduce the memory footprint consumed by your Zimbra install
04/16/2008 09:10am
Write a comment
* = required field