{"id":2056,"date":"2013-05-15T16:30:02","date_gmt":"2013-05-15T08:30:02","guid":{"rendered":"http:\/\/rmohan.com\/?p=2056"},"modified":"2013-08-21T18:50:53","modified_gmt":"2013-08-21T10:50:53","slug":"zimbra-installation","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2056","title":{"rendered":"ZIMBRA  INSTALLATION"},"content":{"rendered":"<p>Zimbra Collaboration Server 8 is amazing, it\u2019s a fresh up take away from the rough hands of Microsoft Exchange. And most importantly, the opensource version has everything that I need. I\u2019ve used it commercially and do recommend it to any clients as it\u2019s just a great platform.<\/p>\n<p>Installation of Zimbra is very easy. I\u2019ve left the comments from my notes to make it easier to understand.<br \/>\nThe installation is from a CentOS 6.3 minimal install after doing my routine secure, hardening and updates.<\/p>\n<p>yum -y update<\/p>\n<p>yum -y install wget setuptool system-config-network system-config-firewall ntsysv nscd perl nc sudo sysstat<\/p>\n<p>yum install system-config-network-tui<br \/>\nyum install system-config-firewall-tui<br \/>\nyum install nc<br \/>\nyum install sudo<br \/>\nyum install mysql mysql-server mysql-devel<br \/>\nyum install sysstat<br \/>\nyum install wget<br \/>\nyum install bind bind-utils<\/p>\n<p>&nbsp;<\/p>\n<p>setup # disable services iptables, sendmail<br \/>\nservice iptables stop<br \/>\nservice sendmail stop<\/p>\n<p>chkconfig sendmail off<br \/>\nchkconfig netfs off<br \/>\nchkconfig rpcbind off<br \/>\nchkconfig rpcgssd off<br \/>\nchkconfig rpcidmapd off<br \/>\nchkconfig fcoe off<br \/>\nchkconfig iptables off<br \/>\nchkconfig ip6tables off<br \/>\nchkconfig iscsi off<br \/>\nchkconfig iscsid off<\/p>\n<p>&nbsp;<\/p>\n<p># Disable Startup Services<br \/>\nservice postfix stop<br \/>\nchkconfig postfix off<br \/>\nservice sendmail stop<br \/>\nchkconfig sendmail off<br \/>\n# Install nc package<br \/>\nyum -y install nc sysstat<br \/>\n# Disable Selinux (unfortunately, Zimbra does not yet fully support Selinux)<br \/>\nsetenforce 0<br \/>\nnano \/etc\/selinux\/config<br \/>\n# Modify<br \/>\nSELINUX=disabled<br \/>\n# Fix hosts file<br \/>\nnano \/etc\/hosts<br \/>\n# Append<br \/>\nipaddress hostname.domain.com hostname<\/p>\n<p>echo &#8220;0 4 * * * root ntpdate time.stdtime.gov.tw&#8221; &gt;&gt; \/etc\/crontab<\/p>\n<p>&nbsp;<\/p>\n<p># Installing Zimbra Opensource<br \/>\nwget http:\/\/files2.zimbra.com\/downloads\/8.0.2_GA\/zcs-8.0.2_GA_5569.RHEL6_64.20121210115059.tgz<br \/>\ntar -zxvf zcs-8.0.2_GA_5569.RHEL6_64.20121210115059.tgz<br \/>\ncd zcs-8.0.2_GA_5569.RHEL6_64.20121210115059<br \/>\n# Centos isn&#8217;t officially supported but RHEL 6 is so we platform-override<br \/>\n# # THIS WILL TAKE A WHILE ##<br \/>\n# This is run in screen as it may take a while #<br \/>\n# depending on your machine, go grab a coffee #<br \/>\n# You can close the screen with ctrl+A+D and<br \/>\n# continue with your other operations #<br \/>\n# If you get disconnected or want to #<br \/>\n# return to the screen simply use $screen -R #<br \/>\n# Configuration steps following this are very self explanatory #<br \/>\n#<br \/>\nscreen .\/install.sh &#8211;platform-override<\/p>\n<p>tep4. Install Zimbra 8<br \/>\n# cd zcs-8.0.0_GA_5434.RHEL6_64.20120907144639<br \/>\n# .\/install.sh &#8211;platform-override<br \/>\nQ1. Do you agree with the terms of the software license agreement? [N] Y<br \/>\nQ2. Do you agree with the terms of the software license agreement? [N] Y<br \/>\nQ3. Install zimbra-ldap [Y] Enter<br \/>\nQ4. Install zimbra-logger [Y] Enter<br \/>\nQ5. Install zimbra-mta [Y] Enter<br \/>\nQ6. Install zimbra-snmp [Y] Enter<br \/>\nQ7. Install zimbra-store [Y] Enter<br \/>\nQ8. Install zimbra-apache [Y] Enter<br \/>\nQ9. Install zimbra-spell [Y] Enter<br \/>\nQ10. Install zimbra-memcached [N] Enter<br \/>\nQ11. Install zimbra-proxy [N] Enter<br \/>\nQ12. Install anyway? [N] Y<br \/>\nQ13.The system will be modified. Continue? [N] Y<br \/>\nQ14. Address unconfigured (**) items (? &#8211; help) 3<br \/>\nQ15. Select, or &#8216;r&#8217; for previous menu [r] 4<br \/>\nQ16. Password for admin@zimbra.iwant-in.net (min 6 characters): [KFAYdeL6]<br \/>\nQ17. Select, or &#8216;r&#8217; for previous menu [r] r<br \/>\nQ18. Select from menu, or press &#8216;a&#8217; to apply config (? &#8211; help) a<br \/>\nQ19. Save configuration data to a file? [Yes] Enter<br \/>\nQ20. Save config in file: [\/opt\/zimbra\/config.8480] Enter<br \/>\nQ21. The system will be modified &#8211; continue? [No] Yes<br \/>\nQ22. Notify Zimbra of your installation? [Yes] No<br \/>\nQ23. Configuration complete &#8211; press return to exit Enter<\/p>\n<p># Optimization on Lower Memory<\/p>\n<p>su zimbra<\/p>\n<p>zmcontrol status<\/p>\n<p>su zimbra<br \/>\nzmlocalconfig -e tomcat_java_heap_memory_percent=40<br \/>\nzmlocalconfig -e mysql_memory_percent=10<br \/>\nzmlocalconfig -e mysql_table_cache=250<br \/>\nzmlocalconfig -e mailboxd_java_heap_memory_percent=10<br \/>\nzmlocalconfig -e zmmtaconfig_interval=7200<br \/>\nzmmtactl restart<\/p>\n<p># Using -l option connects to LDAP Server Instead, Fixes the issue with connecting through soap<br \/>\n# Disable Logger Service, Stats and SNMP<br \/>\n# THIS IS ONLY FOR MY LOW MEMORY SETUP. Not recommended for production use.<\/p>\n<p>zmprov -l ms mail.domain.com -zimbraServiceEnabled snmp<br \/>\nzmprov -l ms mail.domain.com -zimbraServiceEnabled logger<br \/>\nzmprov -l ms mail.domain.com -zimbraServiceEnabled stats<br \/>\nzmcontrol stop<br \/>\nzmcontrol start<br \/>\nzmlocalconfig -e zmmtaconfig_interval=7200<br \/>\nzmprov -l mcf zimbraLogRawLifetime 7d<br \/>\nzmprov -l mcf zimbraLogSummaryLifetime 30d<br \/>\nzmmtactl restart<\/p>\n<p>nano \/opt\/zimbra\/conf\/my.cnf in:<br \/>\n# Modify<br \/>\n# thread_cache_size = 110<br \/>\n# max_connections = 110<\/p>\n<p>thread_cache_size = 20<br \/>\nmax_connections = 20<\/p>\n<p>nano \/opt\/zimbra\/conf\/amavisd.conf.in<br \/>\n# Modify<br \/>\n# $max_servers = 10;<br \/>\n$max_servers = 2;<\/p>\n<p># Configure Iptables Firewall<br \/>\n# enable zimbra ports<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 25 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 80 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 110 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 143 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 389 -j ACCEPT # -s 10.10.3.0\/24<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 443 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 465 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 993 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 995 -j ACCEPT<br \/>\n$iptables -A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 7071 -j ACCEPT # -s 10.10.3.0\/24<\/p>\n<p>And that\u2019s it. Do check out the Zimbra website for a full list of features, unfortunately it is quite memory and cpu intensive and<\/p>\n<p>it\u2019s not comparable to the simple postfix squirelmail setups that some may be used to.<\/p>\n<p>But the feature range is amazing and definitely worth a look into for those on the fence.<\/p>\n<p>&nbsp;<\/p>\n<p>Adding my own WildCard SSL Certificate to Zimbra Collabration Server 8<br \/>\nInstallation of Zimbra is a breeze, on my CentOS 6.3 Minimal install it took less than 5 minutes of interaction.<\/p>\n<p>To get the SSL certificate installed took a little more tweaking then the install but after some trial and error the final list of commands were very short.<\/p>\n<p>cp \/opt\/zimbra\/ssl\/zimbra\/ca.pem \/opt\/zimbra\/ssl\/zimbra\/ca.pem.bak<br \/>\necho \/dev\/null &gt; \/opt\/zimbra\/ssl\/zimbra\/ca.pem<br \/>\nnano \/opt\/zimbra\/ssl\/zimbra\/ca\/ca.pem<br \/>\n# Insert our ca.pem here, only the certificate not the key<br \/>\nnano \/opt\/zimbra\/ssl\/zimbra\/commercial\/commercial.key<br \/>\n# Insert the .key file contents<br \/>\nnano \/opt\/zimbra\/ssl\/zimbra\/commercial\/commercial_ca.crt<br \/>\n# Insert the .crt file contents<\/p>\n<p># Now we&#8217;ll deploy our crt, telling Zimbra it&#8217;s a commercial cert (although it&#8217;s not)<br \/>\n\/opt\/zimbra\/bin\/zmcertmgr deploycrt comm \/opt\/zimbra\/ssl\/zimbra\/ca\/ca.pem<\/p>\n<p># Verify the installed cert<br \/>\n\/opt\/zimbra\/bin\/zmcertmgr viewdeployedcrt<\/p>\n<p># Force SSL with a redirect<br \/>\nzmtlsctl redirect<\/p>\n<p># Restart<br \/>\nzmcontrol stop<br \/>\nzmcontrol start<\/p>\n<p>&nbsp;<\/p>\n<p>At command prompt type<\/p>\n<p>su zimbra<\/p>\n<p>zmcontrol status<\/p>\n<p>To start the zimbra services type:<br \/>\nzmcontrol start<\/p>\n<p>Open a browser and log in at http:\/\/mail.server.com<\/p>\n<p>For admin panel type: http:\/\/mail.server.com:7071<\/p>\n<p>&nbsp;<\/p>\n<p>Change Zimbra Web Client Logo and Title<br \/>\nLogo Path &#8211;&gt; \/opt\/zimbra\/jetty\/webapps\/zimbra\/skins\/_base\/logos<br \/>\nLogo Files &#8211;&gt; AppBanner.png<br \/>\nTitle Defined Path &#8211;&gt; \/opt\/zimbra\/jetty\/webapps\/zimbra\/WEB-INF\/classes\/messages\/ZmMsg.properties<br \/>\nTitle Desc &#8211;&gt; zimbraTitle = IWANT-IN WebMail<br \/>\nzimbraLabel = IWANT-IN WebMail\\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p># su &#8211; zimbra<\/p>\n<p>Depois, basta executar:<\/p>\n<p>$ zmprov -l -v mcf zimbraXMPPEnabled TRUE<br \/>\n$ zmprov -v mc default zimbraFeatureIMEnabled TRUE<br \/>\n$ zmprov -v mc default zimbraFeatureInstantNotify TRUE<br \/>\n$ zmcontrol stop<br \/>\n$ zmcontrol start<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zimbra Collaboration Server 8 is amazing, it\u2019s a fresh up take away from the rough hands of Microsoft Exchange. And most importantly, the opensource version has everything that I need. I\u2019ve used it commercially and do recommend it to any clients as it\u2019s just a great platform.<\/p>\n<p>Installation of Zimbra is very easy. I\u2019ve left [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2056"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2056"}],"version-history":[{"count":4,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2056\/revisions"}],"predecessor-version":[{"id":2476,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2056\/revisions\/2476"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}