Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Zimbra on Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mquinnv
n00b
n00b


Joined: 10 Aug 2003
Posts: 5

PostPosted: Tue Jul 18, 2006 7:58 pm    Post subject: HOWTO: Zimbra on Gentoo Reply with quote

From zimbra.com:
Quote:
Zimbra is an open source server and client technology for next-generation messaging and collaboration. Zimbra delivers innovation for both the administrator and the end-user as well as compatibility with existing infrastructure and applications (both open source and proprietary).

Zimbra is a very slick AJAX-enabled webmail and calendaring application. Unfortunately, they don't provide build packages for gentoo. In order to get it working we'll install Zimbra in an Ubuntu chroot jail.

To setup the chroot we'll be using the debootstrap program which is capable of installing a working Debian or Ubuntu distribution. The instructions below assume x86 and the latest version of Ubuntu, Dapper Drake:
Code:

su
mkdir /Zimbra
echo "dev-util/debootstrap ~x86" >> /etc/portage/package.keywords
emerge debootstrap
debootstrap --arch i386 dapper /Zimbra http://archive.ubuntu.com/ubuntu
cp /etc/resolv.conf /Zimbra/etc
cp /etc/passwd /Zimbra/passwd
sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/shadow | sudo tee /Zimbra/etc/shadow
cp /etc/group /Zimbra/etc/
cp /etc/hosts /Zimbra/etc/
cp /etc/sudoers /Zimbra/etc/
chroot /Zimbra (ignore the error)

Now that you are in the chroot, we'll bring it up to date:
Code:

apt-get update
apt-get install wget debconf devscripts gnupg cron libdb3 libpcre3
apt-get update
dpkg-reconfigure locales
tzconfig
groupadd shadow -g 42
useradd syslog

Unfortunately, Zimbra requires an outdated version of libssl, which you'll need to fetch from http://packages.debian.org/stable/libs/libssl0.9.7. Then install it:
Code:

dpkg -i libssl[whatever].deb

Next, we'll exit the chroot and bind the needed filesystems from the host gentoo installation:
Code:

exit
mount --bind /sys /Zimbra/sys
mount --bind /dev /Zimbra/dev
mount --bind /dev/pts /Zimbra/dev/pts
mount --bind /dev/shm /Zimbra/dev/shm

Back into the chroot to setup logging and our hostname:
Code:

chroot /Zimbra
nano /etc/hostname
/etc/init.d/hostname.sh stop
/etc/init.d/hostname.sh start
/etc/init.d/sysklogd start

Zimbra requires that the hosts file be setup a little different than the gentoo default install, so you'll need to edit your /etc/hosts to have:
Code:
127.0.0.1 localhost.localdomain localhost

Next fetch the coerce.tgz script from http://www.zimbra.com/forums/attachment.php?attachmentid=173 and the debian zimbra package that you would like to install. Unpack the zimbra package and then unpack the coerce package into the zcs directory.

Then install Zimbra normally by running the coerce.sh script:
Code:

cd zcs
./coerce.sh


An init.d script for your gentoo system:
Code:

#!/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
}


Enjoy your new Zimbra installation!

Two documents assisted me greatly in getting this working:
Back to top
View user's profile Send private message
giulianoz
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2004
Posts: 96

PostPosted: Thu Jul 20, 2006 1:19 pm    Post subject: Reply with quote

before debootstrap you have to create a "dapper" script. simply
Code:

cp /usr/lib/debootstrap/scripts/breezy /usr/lib/debootstrap/scripts/dapper


giuliano
Back to top
View user's profile Send private message
mquinnv
n00b
n00b


Joined: 10 Aug 2003
Posts: 5

PostPosted: Tue Jul 25, 2006 7:40 pm    Post subject: dapper script Reply with quote

there was already a dapper script with the latest debootstrap
Back to top
View user's profile Send private message
barthi
Apprentice
Apprentice


Joined: 02 Mar 2003
Posts: 256

PostPosted: Fri Aug 25, 2006 10:03 pm    Post subject: Reply with quote

Hi!

I get the following error, when I want to install Zimbra:

Code:

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.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
cat: modify.debian_version: No such file or directory
cat: modify.dpkg_status: No such file or directory

Operations logged to /tmp/install.log.5541
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.


I followed all the steps and everything worked fine. Any suggestions?

Thanks,
Barthi
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Fri Sep 15, 2006 3:05 am    Post subject: Reply with quote

svn co https://svn.sourceforge.net/svnroot/zimbra zimbra
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
tedj
n00b
n00b


Joined: 10 Jul 2003
Posts: 49

PostPosted: Tue Oct 17, 2006 9:47 pm    Post subject: Reply with quote

barthi, you will see that error if you use debian as the chroot OS instead of Ubuntu.

I had the exact same symptom using sarge and etch - moving to the documented Ubuntu release (and the debian Zimbra packages) worked for me.
Back to top
View user's profile Send private message
outerring
n00b
n00b


Joined: 21 Oct 2006
Posts: 1

PostPosted: Sat Oct 21, 2006 2:35 pm    Post subject: Reply with quote

Hi!

I get the following error, when I want to install Zimbra:

Quote:
*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes] y
Save config in file: [/opt/zimbra/config.7393]
Saving config in /opt/zimbra/config.7393...Done
The system will be modified - continue? [No] y
Operations logged to /tmp/zmsetup.log.7393
Setting local config values...Done
Setting up CA...Done
Creating SSL certificate...Done
Initializing ldap...FAILED (256)


ERROR



Configuration failed

Please address the error and re-run /opt/zimbra/libexec/zmsetup.pl to
complete the configurationroot@linuxgentoo1:/zcs#
Back to top
View user's profile Send private message
lbalan79
n00b
n00b


Joined: 12 Jun 2005
Posts: 55

PostPosted: Wed Nov 22, 2006 8:39 pm    Post subject: Reply with quote

Great tutorial. Can someone help however with zimbra 4.5 and an amd64 configuration?

Thank you.
Back to top
View user's profile Send private message
daniel_brough
n00b
n00b


Joined: 11 Dec 2006
Posts: 1

PostPosted: Mon Dec 11, 2006 3:02 am    Post subject: Reply with quote

I also got the ldap error with the debian chroot.
I ran "apt-get install sed" and that fixed it.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Tue Dec 12, 2006 6:34 pm    Post subject: Reply with quote

im working on a e-build for the svn version right now....

i will let yall know how it goes :D
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Thu Dec 14, 2006 6:14 pm    Post subject: Reply with quote

Svn Ebuild Here -> http://forums.gentoo.org/viewtopic-t-524342.html
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
ar_it
Apprentice
Apprentice


Joined: 25 Feb 2006
Posts: 211
Location: Poland/Warsaw

PostPosted: Wed Feb 28, 2007 11:01 pm    Post subject: Reply with quote

Hallo
When I try start zimbra i chroot i get this

Code:

/etc/init.d/zimbra start
root@server serwer:/# root@server serwer:/# exit
root@server serwer:/#  * Starting periodic command scheduler...          [ ok ]
root@server serwer:/# exit
root@server serwer:/#  * Starting system log...                          [fail]
root@server serwer:/# exit
root@server serwer:/# java.net.UnknownHostException: server serwer.homenetwork: server serwer.homenetwork
        at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
        at com.zimbra.common.localconfig.LC.<clinit>(LC.java:236)
        at com.zimbra.common.localconfig.KnownKey.<clinit>(KnownKey.java:39)
        at com.zimbra.common.localconfig.LocalConfig.verify(LocalConfig.java:327)
        at com.zimbra.common.localconfig.LocalConfig.<init>(LocalConfig.java:177)
        at com.zimbra.common.localconfig.LocalConfig.readConfig(LocalConfig.java:348)
        at com.zimbra.common.localconfig.LocalConfig.<clinit>(LocalConfig.java:353)
        at com.zimbra.common.localconfig.Main.main(Main.java:116)
Host lookup.failed
root@server serwer:/#


I think that it's something wrong here
Code:

cat /etc/hosts
10.0.0.200      serwer serwer homenetwork
127.0.0.1       serwer.homenetwork serwer localhost

_________________
ar_it
http://www.teamquest.pl/
https://pozyskajdane.pl
Back to top
View user's profile Send private message
ahoogerhuis
n00b
n00b


Joined: 06 Jan 2003
Posts: 31

PostPosted: Tue Mar 20, 2007 5:22 am    Post subject: Reply with quote

ar_it wrote:
Hallo
I think that it's something wrong here
Code:

cat /etc/hosts
10.0.0.200      serwer serwer homenetwork
127.0.0.1       serwer.homenetwork serwer localhost


Make it like this:

10.0.0.200 serwer.homenetwork serwer
127.0.0.1 serwer.homenetwork serwer localhost

Always the FQDN first, then alises (alii? :D )

-A
Back to top
View user's profile Send private message
darf
n00b
n00b


Joined: 08 Jan 2007
Posts: 27

PostPosted: Mon Apr 30, 2007 4:39 pm    Post subject: Reply with quote

Getting this error, any ideas?

Code:

# debootstrap --arch i386 dapper /Zimbra http://archive.ubuntu.com/ubuntu/
I: Retrieving Packages
I: Retrieving Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
W: Failure trying to run: chroot /Zimbra mount -t proc proc /proc
#
Back to top
View user's profile Send private message
monicajae
Guru
Guru


Joined: 03 Sep 2003
Posts: 363
Location: Dorset, VT

PostPosted: Tue May 01, 2007 6:58 pm    Post subject: Reply with quote

i personally recommend getting it via svn or layman
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Sun May 20, 2007 9:00 am    Post subject: Reply with quote

You've mentioned this in two different threads now.

Some info about the overlay would be nice, a link , the config info, or the name if it is in the default gentoo layman config
_________________
GibbonsR.net | OpenLaptops.org

Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
monicajae
Guru
Guru


Joined: 03 Sep 2003
Posts: 363
Location: Dorset, VT

PostPosted: Wed May 23, 2007 5:53 am    Post subject: Reply with quote

I will get back to u on that. http://forums.gentoo.org/viewtopic-t-524342-highlight-zimbra.html
in the meantime try that. It Maybe more informative
Back to top
View user's profile Send private message
drgath
n00b
n00b


Joined: 05 Jun 2007
Posts: 1

PostPosted: Tue Jun 05, 2007 9:11 pm    Post subject: Reply with quote

darf wrote:
Getting this error, any ideas?

Code:

# debootstrap --arch i386 dapper /Zimbra http://archive.ubuntu.com/ubuntu/
I: Retrieving Packages
I: Retrieving Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
W: Failure trying to run: chroot /Zimbra mount -t proc proc /proc
#


Same issue here.

Code:

# debootstrap --arch i386 dapper /Zimbra http://archive.ubuntu.com/ubuntu/

blah blah blah

W: Failure trying to run: chroot /Zimbra mount -t proc proc /proc

# $?
bash: 1: command not found


For whatever reason the chroot jail isn't getting the mount command. Hmm....


Update:

Same issue when I tried with Debian Etch

Code:


#debootstrap etch /Zimbra http://ftp.debian.org/debian

......

W: Failure trying to run: chroot /Zimbra mount -t proc proc /proc



I'm thinking it has something to do with this Gentoo version because it worked fine step by step on another server with a different Gentoo install a couple months back.

grrr....
Back to top
View user's profile Send private message
hybrid256
n00b
n00b


Joined: 18 Mar 2005
Posts: 22

PostPosted: Sun Jun 10, 2007 10:45 am    Post subject: and next ?? Reply with quote

Hi !

I followed the howto and got everything installed without errors on my Gentoo 2007.0 box + debian chroot jail for Zimbra (Zimbra 4.5.5).
I might be dumb but what's next ?
How do I access the webui of my server running in its chrooted environnment ?
Do I have to create a vhost ?

I don't know what to do, please, does anyone can help ?

Thanks
Back to top
View user's profile Send private message
Jokey_
Retired Dev
Retired Dev


Joined: 24 Jan 2006
Posts: 34
Location: Germany

PostPosted: Wed Jul 04, 2007 8:31 pm    Post subject: Reply with quote

Just access it via web. it starts a webserver so you can point your browser to it

btw I had to symlink libcrypto and libssl from 0.9.8 to 0.9.7 but the packages don't seem to break, so weird case :x
_________________
Your ebuild bug is assigned maintainer-wanted? Maintain it yourself in the gentoo user overlay
http://overlays.gentoo.org/proj/sunrise | irc.freenode.net #gentoo-sunrise
Back to top
View user's profile Send private message
papango
n00b
n00b


Joined: 30 Mar 2008
Posts: 2

PostPosted: Sun Mar 30, 2008 10:53 am    Post subject: Reply with quote

hi,

when running
debootstrap --arch i386 dapper /Zimbra http://archive.ubuntu.com/ubuntu

i get this error:
W: Failure trying to run: chroot /Zimbra mount -t proc proc /proc

i'm a newbie but really would like to run zimbra on my gentoo.

still tried to continue but apt-get update gives me bash: apt-get: command not found

any help would be appreciated
Back to top
View user's profile Send private message
lolek25
n00b
n00b


Joined: 24 Jul 2008
Posts: 1

PostPosted: Thu Jul 24, 2008 11:03 am    Post subject: Reply with quote

hello!
I've got similar problem and I can't deal with him. HELP!! :(
_________________
najtańszy przepływomierz vw golf tdi MS i wiele innych części
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum