Create XEN Zimbra domain (Zimbra Collaboration Suite)

#!/bin/bash
 
wget http://www.panticz.de/sites/default/files/ubuntu-2.6.22-14-xen.i386-kernel.tar.bz2 -P /tmp
tar -xjPf /tmp/ubuntu-2.6.22-14-xen.i386-kernel.tar.bz2
 
DOMAIN_NAME=mx
 
xen-create-image --hostname=$DOMAIN_NAME --ip=192.168.1.231 --gateway=192.168.1.5 --netmask=255.255.255.0 \
--dir=/home/xen --dist=gutsy --mirror=http://archive.ubuntu.com/ubuntu/ --arch=i386 \
--size=8Gb --memory=1Gb --swap=1Gb \
--kernel=/boot/vmlinuz-2.6.22-14-xen.i386 --initrd=/boot/initrd.img-2.6.22-14-xen.i386
 
cp /etc/xen/$DOMAIN_NAME.cfg  /etc/xen/$DOMAIN_NAME.cfg.org
sed -i 's|file:|tap:aio:|g' /etc/xen/$DOMAIN_NAME.cfg
mv /etc/xen/$DOMAIN_NAME.cfg /etc/xen/$DOMAIN_NAME
 
xm create -c $DOMAIN_NAME
 
ln -sf /bin/bash /bin/sh
 
echo "192.168.1.231   $DOMAIN_NAME.YOUR_DOMAIN   $DOMAIN_NAME" >> /etc/hosts
 
apt-get install -y fetchmail libpcre3 libgmp3c2 libexpat1 libxml2 libstdc++5 openssl libltdl3
#apt-get install -y curl libtie-ixhash-perl wget   
 
wget http://files.zimbra.com/downloads/5.0.4_GA/zcs-5.0.4_GA_2101.UBUNTU6.20080321150617.tgz -P /tmp
 
tar xzf /tmp/zcs-*.tgz -C /tmp
cd /tmp/zcs-*
/bin/bash ./install.sh --platforrm-override
 
https://<SERVER_IP>:7071/zimbraAdmin/
 
# Link
http://www.zimbra.com/community/ - community page
http://www.howtoforge.com/installing_zimbra_collaboration_suite_on_ubuntu - HowTo
http://www.zimbra.com/community/documentation.html - Documentation
http://wiki.zimbra.com - Wiki