Difference between revisions of "Building Zimbra on Gentoo"
(→Installing Zimbra on Gentoo using the provided Debian package) |
(Adding categories) |
||
Line 74: | Line 74: | ||
==Building Zimbra from source on Gentoo== | ==Building Zimbra from source on Gentoo== | ||
''(needs to be documented)'' | ''(needs to be documented)'' | ||
+ | |||
+ | [[Category:Gentoo]] | ||
+ | [[Category:Installation]] | ||
+ | [[Category:Build]] |
Revision as of 21:49, 10 October 2007
Installing Zimbra on Gentoo using the provided Debian package
(Taken from http://www.elfenbeinturm.cc/2006/07/28/zimbra-on-gentoo/)
- add dev-util/debootstrap to your /etc/portage/package.keywords
- emerge debootstrap
- create the chroot environment: mkdir /zimbra
- 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)
- 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
- chroot to the debian environment: chroot /zimbra
- Set a root password
- Adjust your /etc/hosts and /etc/hostname
- Edit your /etc/apt/apt.conf and add: APT::Cache-Limit 16777216;
- Add testing and unstable repositories to /etc/apt/sources.list [NOTE: it was suggested that this step is harmful; do at your own risk]:
- deb http://debian.tu-bs.de/debian/ testing main non-free contrib
- deb http://debian.tu-bs.de/debian/ unstable main non-free contrib
- Update the package listing: apt-get update
- Update the system: apt-get upgrade
- Install required packages:
- apt-get install sudo libidn11 curl fetchmail libgmp3 libxml2 libstdc++6 openssl file perl libexpat1
- Get the zimbra debian package and untar the archive
- Run ./install.sh in the newly created zcs directory and follow the instructions
- Create the init.d script (/etc/init.d/zimbra)
- 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)