Wednesday, January 4, 2012

Setting up zimbra centos 6 64bits

#makesure to update first
yum update
#install java first
yum install java-1.6.0
yum install netc
yum install which

#change existing httpd port other port than 80
sudo vi /etc/httpd/conf/httpd.conf
#change line: Listen 80 to Listen 8080 (any other port)

#change existing sendmail port to other than port 25
sudo vi /etc/mail/
#locate line:
DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl
#change to other port than 25 / smtp
DAEMON_OPTIONS(`Port=2525,Addr=, Name=MTA')dnl

#locate line:
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
#change to other port than 25 / smtp
dnl DAEMON_OPTIONS(`port=2525,Addr=::1, Name=MTA-v6, Family=inet6')dnl
#run this to apply changes
m4 > /etc/

#temporary disable sudo tty requirement
#locate line Default requiretty and disable it with a #
#Defaults requiretty

/etc/init.d/httpd restart
/etc/init.d/sendmail restart

#double check to ensure both http / 80 and smtp / 25 is not used any longer
netstat -lp

#Go to zimbra website and download the respective package for your platform...
#if something went wrong, check the log.
#to resetup, run:

#when done, reboot the system
sudo reboot

#next, run netstat -lp to check if system is running
#try telnet localhost 25, telnet localhost 110 and try web browsing
#to restart the service, try:
/etc/init.d/zimbra restart

sudo -u zimbra /opt/zimbra/bin/zmcontrol status
# mailbox                 Stopped
#check the log
tail -n 100 /opt/zimbra/log/mailbox.log
#if it shows
...Unknown table engine 'InnoDB'
#it meants that your innodb engine is not initiated , and most likely is memory issue.
#try changing innodb_buffer_pool_size to a lower value (below about 40% of your memory or vps memory)
sudo vi /opt/zimbra/conf/my.inf
#locate line innodb_buffer_pool_size
#restart zimbra mail
sudo -u zimbra /opt/zimbra/bin/mysql.server restart
sudo -u zimbra /opt/zimbra/bin/zmmailboxdctl restart

#to begin:

#If you forgotten your password, run this on server:
/opt/zimbra/bin/zmprov sp [password]

If you get error in the admin ui with:
Message: system failure: server  zimbraRemoteManagementPrivateKeyPath (/opt/zimbra/.ssh/zimbra_identity) does not exist Error code: service.FAILURE Details:soap:Receive
Try this:

If you are facing memory heap size problem with java, try following this link:
and also set your default heap size in java by editing ~/.bash_profile
export _JAVA_OPTIONS=-Xmx100m

#If your mail have not been deliver, try check the que by running:
sudo mailq

#if you encounter some file(1) utils missing, install it by running:
sudo yum install file

#If you are running zimbra from a openvz vps, please ensure min 3Gb of burst memory. Or it wont run properly. The problem is due to missing swap in openvz. So it will need sufficient memory to run.


No comments: