Prepare the VPS
Before we install Zimbra, we must install the follow packages
root@HN# vzctl exec 101 yum install ant sysstat gmp compat-libstdc++-296 compat-libstdc++-33
The above list should be good enough for Zimbra 6. If installing Zimbra 5, then we also have to have:
root@HN# vzctl exec 101 yum install fetchmail libtool-ltdl
The package "ant" will bring in the latest jdk. The README file in the Zimbra installation package suggests that we use JDK 1.5.0_04. According to this discussion, there were three bugs in JDK 1.6 that prevents Zimbra from using it. I check the status of those bugs and they all have been marked as "fixed".
Next we will test out how Java runs in the VPS.
root@HN# vzctl exec 101 ant
I kept getting error message from ant as below:
Error occurred during initialization of VM
Could not reserve enough space for object heap
*** glibc detected *** /usr/lib/jvm/java/bin/java: double free or corruption (out): 0xb7f4b260 ***
There is a post in the OpenVZ forum that explained how to fix this problem. First check the user_beancounters for problem in resource allocation:
root@HN# vzctl exec 101 cat /proc/user_beancounters
In the output, the last column is "failcnt", which should all be 0. Find the one(s) that is not zero, then adjust in /etc/sysconfig/vz-scripts/101.conf:
root@HN# vi /etc/sysconfig/vz-scripts/101.conf
First, I increased the limit (the value after the colon":") and after validating the file, I restarted the VPS. If it didn't work, then I increased the barrier (the value before the colon ":") and after validating the file again restarted the VPS. To validate the file, run:
root@HN# vzcfgvalidate /etc/sysconfig/vz-scripts/101.conf
Slowly the values in failcnt started decreasing and finally became "0" (zero), I was able to run "ant".
Here are some more posts on UBC:
Prepare host and MX
We should configure the correct MX and set the fully qualified host name on the host.
If you server is behind NAT, and has a internal IP address, you can do one of the following hacks to satisfy Zimbra installer, which insists on resolving one of the MX to this server:
-
If you have a local DNS server, then add a MX record to this server's private IP for the zone of this server's domain. Such record should only answer to local query only. Public view should not get such record.
-
If you don't have a local DNS server, then add the public IP address of the MX server as an IP alias of this server.
Install Zimbra
Now install zimbra.
root@vz101# cd zcs-6
root@vz101# ./install.sh --override-platform
If Zimbra won't start, check the "failcnt" in /proc/user_beancounters again. I had to adjuct the UBC values again and again in order for zimbra to start.
Comments
Anonymous
June 16, 2009
1 year 11 weeks
zimbra behind nat
how can i add the public IP address of the MX server as an IP alias of this server?
Im running a zimbra test server behind a NAT firewall and it wont start the MTA
I dont have an internal DNS server since this is just a test network
voyageur
June 18, 2009
1 year 11 weeks
Use "ip addr add"
There is a utility that allows you to add ip alias to your test server. Invoke "man ip" to look at the manual page. This utility is installed by default on CentOS.
To use this utility to add ip alias, do something like
# /sbin/ip addr add 192.168.1.100/24 dev eth0
Hope this helps.