Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Running from chroot?

  1. #1
    lxnay is offline Member
    Join Date
    Jan 2006
    Posts
    11
    Rep Power
    9

    Default Gentoo - Running from chroot?

    Is it possible to run zimbra from a chroot in your opinion?
    I'm asking this because I have to setup a new Gentoo server and, because I love zimbra, I want to get it working asap, and I'm quite good in mixing distros ( ), I could setup a chroot jail containing debian 3.1.
    In this way, I could have the power of Gentoo, and at the same time, the power of zimbra.

    Unfortunately, building zimbra from cvs, is a pain in the: < ... ... >.
    Last edited by lxnay; 05-23-2006 at 11:41 AM.

  2. #2
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    It may work but don't think anyone has tried it.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    lxnay is offline Member
    Join Date
    Jan 2006
    Posts
    11
    Rep Power
    9

    Default it works !

    Amazing!
    It works nicely !
    And it works for every Linux distribution !!

    Well, get the latest ubuntu livecd ISO (you need to have squashfs enabled into the kernel or as a module - ubuntu livecd uses squashfs)

    mount that (loop):
    mkdir /mnt/temp /mnt/temp2
    mount -o loop /path/to/ubuntu-livecd.iso /mnt/temp
    mount -o loop /mnt/temp/casper/[don't remember the name].squashfs /mnt/temp2
    mkdir /mnt/chroot
    cp /mnt/temp2/* /mnt/chroot/ -Rp
    umount /mnt/temp2
    umount /mnt/temp
    --> get the latest zimbra for debian 3.1
    --> search in the forums for coerce.sh script
    --> get libssl.so.0.9.7 from ubuntu repository (this because ubuntu dapper has only libssl.so.0.9.8) and put that in /mnt/chroot/usr/lib/
    chroot /mnt/chroot
    apt-get update (if you want)
    --> remove everything that you want (for example, Xorg, gnome, kde)
    please take care that coerce.sh wants libgmp3 that conflicts with libgmp3c2, just remove this one using apt-get remove libgmp3c2
    --> exit from chroot (type: exit)
    mount --bind /proc /mnt/chroot/proc
    mount --bind /sys /mnt/chroot/sys
    mount --bind /dev /mnt/chroot/dev
    mount --bind /dev/pts /mnt/chroot/dev/pts
    mount --bind /dev/shm /mnt/chroot/dev/shm
    cp /etc/resolv.conf /mnt/chroot/etc/resolv.conf
    chroot /mnt/chroot
    /etc/init.d/cron start
    /etc/init.d/sysklogd start
    --> edit /etc/hostname according to the real hostname of your computer
    Start the installation using coerce.sh over the zimbra installer
    To run zimbra:
    su - zimbra -c "/opt/zimbra/bin/zmcontrol start"
    To stop zimbra replace start with stop

    Have fun.

    To load zimbra at startup, just create a stupid bash script that binds the /proc and friends and start the rest, to run a command from a chroot, just:

    echo "/etc/init.d/cron start" | chroot /mnt/chroot

    Have fun² !

    Niceeee, Zimbra on Gentoo :P
    Zimbra everywhere. Just tar the whole chroot, copy to another computer and let the game begins again !!

    Why don't you make this way of installation the default one?

  4. #4
    RyecoAaron is offline Senior Member
    Join Date
    Nov 2005
    Location
    Beloit, Wisconsin
    Posts
    71
    Rep Power
    9

    Default

    Quote Originally Posted by lxnay
    Why don't you make this way of installation the default one?
    I agree. One chroot install with just the minimal files needed. That should satisfy all the people who run a non-supported distro.

  5. #5
    lxnay is offline Member
    Join Date
    Jan 2006
    Posts
    11
    Rep Power
    9

    Default

    Code:
    #!/sbin/runscript
    
    depend() {
        need net
        after portmap
        after iptables
        after dnsmasq
    }
    
    start() {
    
    chroot="/mnt/chroot"
    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="/mnt/chroot"
    
    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
    
    
    }
    That's my gentoo /etc/init.d/zimbra

  6. #6
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,470
    Rep Power
    56

    Default

    Well done for getting that going. It would be helpful if you posted a copy of these instructions in the wiki for future reference.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    freigeist is offline Junior Member
    Join Date
    Jul 2006
    Posts
    5
    Rep Power
    8

    Default

    I have successfully installed it on my gentoo system using debootstrap (gives a much smaller and cleaner system than using the ubuntu live cd):

    * add ~x86 for dev-util/debootstrap to your /etc/portage/package.keywords
    * emerge debootstrap
    * create the chroot environment: mkdir /zimbra
    * run debootstrap: debootstrap woody /zimbra http://ftp.debian.org/debian
    * mount proc, dev and sys
    o mount –bind /proc /zimbra/proc
    o mount –bind /sys /zimbra/sys
    o mount –bind /dev /zimbra/dev
    o mount –bind /dev/pts /zimbra/dev/pts
    o mount –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:
    o deb http://debian.tu-bs.de/debian/ testing main non-free contrib
    o 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:
    o 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

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


    Elfenbeinturm.cc
    a metaphysical space of solitude and sanctity: http://www.elfenbeinturm.cc

  8. #8
    barthi is offline Starter Member
    Join Date
    Aug 2006
    Posts
    1
    Rep Power
    8

    Default

    Hi!

    I also wanted to install zimbra on a gentoo machine. I followed all the steps listed, but when it comes to installing zimbra (executing coerce.sh) I get the following output:
    Code:
    ROCK ~ # chroot /Zimbra/
    root@ROCK:/# cd zcs/
    root@ROCK:/zcs# ./coerce.sh
    Reading package lists... Done
    Building dependency tree... Done
    sudo is already the newest version.
    libidn11 is already the newest version.
    curl is already the newest version.
    fetchmail is already the newest version.
    libgmp3c2 is already the newest version.
    libxml2 is already the newest version.
    libstdc++6 is already the newest version.
    openssl is already the newest version.
    You might want to run `apt-get -f install' to correct these:
    The following packages have unmet dependencies:
      alsa-base: Depends: lsof (>= 4.64) but it is not going to be installed
      tcpd: Depends: libwrap0 (>= 7.6-1.1) but it is not going to be installed
      ubuntu-minimal: Depends: netcat but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    cat: modify.debian_version: No such file or directory
    cat: modify.dpkg_status: No such file or directory
    
    Operations logged to /tmp/install.log.20376
    Checking for existing installation...
        zimbra-ldap...NOT FOUND
        zimbra-logger...NOT FOUND
        zimbra-mta...NOT FOUND
        zimbra-snmp...NOT FOUND
        zimbra-store...NOT FOUND
        zimbra-apache...NOT FOUND
        zimbra-spell...NOT FOUND
        zimbra-core...NOT FOUND
    
    
    PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
    ZIMBRA, INC. ("ZIMBRA") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
    FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
    THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
    THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
    AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.
    
    License Terms for the Zimbra Collaboration Suite:
            http://www.zimbra.com/license/collaboration_suite_collective_license_1.0.html
    
    
    Press Return to continue
    
    Checking for prerequisites...
        NPTL...FOUND
        sudo...MISSING
        libidn...MISSING
        curl...MISSING
        fetchmail...MISSING
        gmp...MISSING
    
    ###ERROR###
    
    One or more prerequisite packages are missing.
    Please install them before running this installer.
    
    Installation cancelled.
    
    root@ROCK:/zcs#
    Can anyone tell me, what the problem is?

  9. #9
    freigeist is offline Junior Member
    Join Date
    Jul 2006
    Posts
    5
    Rep Power
    8

    Default

    Obviously your are missing some packages:

    sudo...MISSING
    libidn...MISSING
    curl...MISSING
    fetchmail...MISSING
    gmp...MISSING

    install them with apt-get install.

    Quoted from my message above:

    o 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


    First you should fix the dependency errors:

    You might want to run `apt-get -f install' to correct these:
    The following packages have unmet dependencies:

    ...
    Elfenbeinturm.cc
    a metaphysical space of solitude and sanctity: http://www.elfenbeinturm.cc

  10. #10
    dhave is offline Starter Member
    Join Date
    Sep 2006
    Posts
    2
    Rep Power
    8

    Default

    Quote Originally Posted by freigeist
    I have successfully installed it on my gentoo system using debootstrap (gives a much smaller and cleaner system than using the ubuntu live cd): ...
    http://www.elfenbeinturm.cc
    I went to your site here http://www.elfenbeinturm.cc/2006/07/...bra-on-gentoo/ and read through the procedure.

    It sounds very tempting. I like Zimbra but haven’t been able to use it beyond the demo since I’m a Gentoo user. Tell me, after installation and setup, what’s involved in using this approach on a regular basis? Do I need to chroot into the Debian environment everytime I want to use Zimbra? Or is the chrooted Debian environment necessary only for installation of Zimbra?

    Thanks.

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. tomcat not running / postfix/postqueue errors
    By seravitae in forum Installation
    Replies: 7
    Last Post: 03-10-2007, 08:18 PM
  3. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  4. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 10:34 PM
  5. Trouble sending mail from Outlook
    By czaveri in forum Users
    Replies: 15
    Last Post: 07-24-2006, 11:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •