Zimbra KVM

I have a love hate relationship with Zimbra, mostly love to hate it, have a Network Edition KVM which i am not that thrilled with, for alot of reasons comment me if you are interested in them   For this document I have setup a KVM using the OSS version, and wow Zimbra 8 is shiny and new, forgot how great of a FREE product it is really quite amazing.

The Zimbra installer script takes care of the bulk of the work however you need to have your infrastructure in place.  DNS DNS DNS there are a few tricks i have read about that you can get zimbra working  without setting up DNS, have not tried any of them.  However have spent countless hours troubleshooting weird errors and log messages that you would never believe DNS to be the cause, but everything is always a DNS problem so get the DNS working perfectly before you install Zimbra.

Ok enough chit-chat lets get at it

Create a KVM with min requirements actually i soup it up a bit to make the install go faster like giving it 10 CPU an 10G of RAM but you only really need this; name mx3.computerking.ca, kernel type linux 3/2.6, 1 cpu 2G RAM; 10G hard disk. After it is install i turn this down 2 CPU 2GB RAM

Before starting the machine create another hard disk 50G or something to mount  /opt/zimbra on that way you can set it to not to be backup up by  the hyper-visor  Like to get my Zimbra backups the old fashioned way from the files not the devices, using rsync producing usable incremental, better compression, especially for offsite.  Oh and i almost forgot set the cd-rom to boot Ubuntu 12.04.1 LTS 64bit Server edition no GUI’s you pansies

Install Ubuntu all default except select openssh server then do
apt-get update && apt-get dist-upgrade
to make sure you are up to date.  

I kind of miss waiting a day or two to recompile my new OS like FreeBSD or Gentoo just kidding, as much as i love those two OS’s there just is not enough processing power in any of my servers to make world go fast enough.  Nothing beats compiling everything from source as far as preformace goes but alas Zimbra is probably the single biggest reason i do not still run everything on FreeBSD wow i really got off topic there.  

Lets install the  Zimbra dependencies

apt-get install bind9 apt-get install libperl5.14 sysstat sqlite3 libgmp3c2

Setup /etc/hosts

127.0.0.1       localhost.localdomain   localhost
10.0.0.122      mx3.computerking.ca     mx3

and /etc/hostname

mx3.computerking.ca

I really hate the way Debain/Ubuntu like to split thier conf files up all over the OS their bind configuration is a perfect example, really fragments my brain, not to mention pisses me off alot. I tried to fight it once putting everything where i like it, but then apparmour came along and messed all that up. Seriously four files to get a named.conf working, /var/cache/bind for the master db files, and i can’t even remember where the slave db files go something like /var/db/bind? Anyways here are all my Ubuntu Debian style file fragments almost humorous on file per line of config i guess on good thing is we do not have to touch the /etc/named.conf.default-zones file.

NOTE to self check the default 127.0.0.1 zone

/etc/bind/named.conf

# This just to keep u from actually putting anything useful in this file and to fragment your brain.
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

/etc/bind/named.conf.option

options {
      forwarders {
                8.8.8.8;
                8.8.4.4;
     };
      dnssec-validation auto;
      auth-nxdomain no;    # conform to RFC103
      listen-on-v6 { any; };
};

/etc/named.conf.local

  
zone "computerking.ca"  {
                type master;
                file "/etc/bind/db.computerking.ca";
};

        zone "0.0.10.in-addr.arpa" {
                type master;
                file "/etc/bind/db.0.0.10";
};

        zone "0.0.127.in-addr.arpa" {
                type master;
                file "/etc/bind/db.0.0.127";
};

/etc/bind/db.computerking.ca

;
; BIND data file for homedomain.org
;
$TTL      604800
computerking.ca.          IN      SOA    ns3.computerking.ca.  ryan.computerking.ca. (
                                   2012103002     ; Serial
                                   604800         ; Refresh
                                   86400          ; Retry
                                   2419200        ; Expire
                                   604800 )       ; Negative Cache TTL

computerking.ca.        IN      NS      ns3.computerking.ca.
computerking.ca.        IN      MX  10  mx3.computerking.ca.
computerking.ca.        IN      A       10.0.0.122
ns3.computerking.ca.    IN      A       10.0.0.122
mx3.computerking.ca.    IN      A       10.0.0.122

/etc/bind/db.0.0.10

$TTL 1D
0.0.10.in-addr.arpa.            IN      SOA     ns3.computerking.ca.  root.computerking.ca. (
                                       2012103002       ; Serial
                                       8H      ; Refresh
                                       2H      ; Retry
                                       4W      ; Expire
                                       1D)     ; Minimum TTL

0.0.10.in-addr.arpa.            IN      NS      ns3.computerking.ca.
122.0.0.10.in-addr.arpa.        IN      PTR     computerking.ca.
122.0.0.10.in-addr.arpa.        IN      PTR     ns3.computerking.ca.
122.0.0.10.in-addr.arpa.        IN      PTR     mx3.computerking.ca.

/etc/bind/db.0.0.127

$TTL 3D
@               IN      SOA    mx3.computerking.ca. admin.computerking.ca. (
                               2012022701       ; Serial
                               8H      ; Refresh
                               2H      ; Retry
                               4W      ; Expire
                               1D)     ; Minimum TTL
                        NS     mx3.computerking.ca.
1                       PTR    localhost.

Test your all of the above your really need this to be right except for ‘hostname -f’ i can never get it to work but the install still works

root@mx3:~#hostname -f
mx3.computerking.ca
root@mx3:~# host 'hostname -f'
Host hostname -f not found: 3(NXDOMAIN)
root@mx3:~# host -t MX `domainname -f`
mx3.computerking.ca has no MX record
root@mx3:~# host -t MX `domainname -d`
computerking.ca mail is handled by 10 mx3.computerking.ca.
root@mx3:~# host 10.0.0.122
122.0.0.10.in-addr.arpa domain name pointer computerking.ca.
122.0.0.10.in-addr.arpa domain name pointer mx3.computerking.ca.
122.0.0.10.in-addr.arpa domain name pointer ns3.computerking.ca.

we are now ready to run the mighty all powerfull ./install.sh command first we download the zimbra install files, unompress them and then run the command.

wget http://files2.zimbra.com/downloads/8.0.0_GA/zcs-8.0.0_GA_5434.UBUNTU12_64.20120907144631.tgz
tar -xvf zcs-8.0.0_GA_5434.UBUNTU12_64.20120907144631.tgz
zcs/install.sh

After loads of time, and configuring you will have an awsome fully fuctional Zimbra install with a KVM

2 comments

Leave a Reply to http://en.netlog.com/onealmelissa/blog Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.