Building Zimbra on Gentoo

Revision as of 21:49, 10 October 2007 by Cfremon (talk | contribs) (Adding categories)

Installing Zimbra on Gentoo using the provided Debian package

(Taken from

  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 (If you are on amd64 you will need to use debootstrap --arch i386 sarge /zimbra 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 ./ 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


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

start() {

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

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

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() {


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

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