Difference between revisions of "Building Zimbra on Gentoo"

m
Line 1: Line 1:
 
==Installing Zimbra on Gentoo using the provided Debian package==
 
==Installing Zimbra on Gentoo using the provided Debian package==
 
''(Taken from http://www.elfenbeinturm.cc/2006/07/28/zimbra-on-gentoo/)''
 
''(Taken from http://www.elfenbeinturm.cc/2006/07/28/zimbra-on-gentoo/)''
# add ~x86 for dev-util/debootstrap to your /etc/portage/package.keywords
+
# add dev-util/debootstrap to your /etc/portage/package.keywords
 
# emerge debootstrap
 
# emerge debootstrap
 
# create the chroot environment: mkdir /zimbra
 
# create the chroot environment: mkdir /zimbra

Revision as of 18:16, 12 April 2007

Installing Zimbra on Gentoo using the provided Debian package

(Taken from http://www.elfenbeinturm.cc/2006/07/28/zimbra-on-gentoo/)

  1. add dev-util/debootstrap to your /etc/portage/package.keywords
  2. emerge debootstrap
  3. create the chroot environment: mkdir /zimbra
  4. run debootstrap: debootstrap sarge /zimbra http://ftp.debian.org/debian (If you are on amd64 you will need to use debootstrap --arch i386 sarge /zimbra http://ftp.debian.org/debian so that it knows which architecture to bootstrap onto your machine)
  5. mount proc, dev and sys
    • mount -o bind /proc /zimbra/proc
    • mount -o bind /sys /zimbra/sys
    • mount -o bind /dev /zimbra/dev
    • mount -o bind /dev/pts /zimbra/dev/pts
    • mount -o bind /dev/shm /zimbra/dev/shm
  6. chroot to the debian environment: chroot /zimbra
  7. Set a root password
  8. Adjust your /etc/hosts and /etc/hostname
  9. Edit your /etc/apt/apt.conf and add: APT::Cache-Limit 16777216;
  10. Add testing and unstable repositories to /etc/apt/sources.list [NOTE: it was suggested that this step is harmful; do at your own risk]:
  11. Update the package listing: apt-get update
  12. Update the system: apt-get upgrade
  13. Install required packages:
    • apt-get install sudo libidn11 curl fetchmail libgmp3 libxml2 libstdc 6 openssl file perl libexpat1
  14. Get the zimbra debian package and untar the archive
  15. Run ./install.sh in the newly created zcs directory and follow the instructions
  16. Create the init.d script (/etc/init.d/zimbra)
  17. Start the zimbra suite: /etc/init.d/zimbra start

init.d script

#!/sbin/runscript

depend() {
    need net
    after portmap
    after iptables
    after dnsmasq
}

start() {

chroot="/Zimbra"
bind_directories="proc dev dev/pts dev/shm sys"

for directory in $bind_directories ; do
 mount --bind /$directory $chroot/$directory
done

echo "rm -rf /var/run/*.pid" | chroot $chroot
echo "/etc/init.d/cron start" | chroot $chroot
echo "/etc/init.d/sysklogd start" | chroot $chroot
echo 'su - zimbra -c "/opt/zimbra/bin/zmcontrol start"' | chroot $chroot

}

stop() {

chroot="/Zimbra"

echo 'su - zimbra -c "/opt/zimbra/bin/zmcontrol stop"' | chroot $chroot
echo "/etc/init.d/cron stop" | chroot $chroot
echo "/etc/init.d/sysklogd stop" | chroot $chroot

bind_directories="proc dev/pts dev/shm dev sys"

for directory in $bind_directories ; do
  umount $chroot/$directory
done
} 

Your debian environment needs less than 200 MB (without zimbra) which isn’t too much overhead.

Building Zimbra from source on Gentoo

(needs to be documented)

Jump to: navigation, search