Step by Step Guide to Setup & Configure Zimbra Mail Server on CentOS 7

0
1314

In this article we guide you with basic steps to install and configure Zimbra Collaboration Suite using Open Source Edition with single server installation where all the three components are installed on one server which includes Zimbra MTA, Zimbra LDAP server and Zimbra mailbox server with no additional manual configurations as its build only for Zimbra application suite. This article we are using zimbra collaboration 8.6 open source edition single server installation.

Basic requirements and resources

  • To install Zimbra server we cannot have any other web server, database or MTA services running on it.
  • DNS A record with fully qualified domain name must be configured to resolve host name
  • MX record to route message to mail server
  • Firewall should be disabled or to be allowed for all zimbra ports.

Prepared CentOS 7 for Zimbra

1) Login as a root user on CentOS-7

2) Enter the fully qualified domain name in host file.

# vi /etc/hosts
27.147.136.x zmail.uniglory-bd.com zmail

3) Disable SELINUX and Firewall

# vi /etc/sysconfig/selinux
SELINUX=disabled

To stop and disable firewalld, run following commands as root:

#systemctl stop firewalld
#systemctl disable firewalld

4) Check the status of web, database and MTA services to Stop and Disable

#systemctl stop httpd
#systemctl disable httpd
#systemctl stop mysqld
#systemctl disable mysqld
#systemctl stop postfix
#systemctl disable postfix
#systemctl stop sendmail
#systemctl disable sendmail

5) Update your system to upgrade all CentOS system software to the latest version.

#yum update

6) Now before starting the installation script make sure to confirm that its required dependencies are installed. Without required dependencies installation process will not run. We can install the following required dependencies by using below yum command.

# yum install nptl nmap-ncat sudo-1.8.6p7-13 libidn-1.28-3 gmp-6.0.0-11 libaio-0.3.109-12 gmp-6.0.0-11 libaio-0.3.109-12 libstdc++-4.8.3-9 unzip-6.0-13 perl-core perl-5.16.3 sysstat sqlite

 Begin Installation of ZCS Open Source Edition

1) Create a new directory and download the latest Zimbra Collaboration Open Source Edition Suite.

#mkdir /backup
#cd /backup
backup]# wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz

2) Extract “zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz” package in same /backup directory

backup]# tar zxvf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz

3) Now change the directory to ZCS and start the installation script using below command

[root@zmail backup]# cd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110/
[root@zmail zcs-8.6.0_GA_1153.RHEL7_64.20141215151110]# ./install.sh --platform-override

We are using ‘–platform-override‘ option in above command because installation script is only for Redhat  Linux but we are installing on CentOS 7 machine so to override the Platform condition we are using this option. When we execute the above command we will get below output and follow the instructions :

Operations logged to /tmp/install.log.2570
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-convertd...NOT FOUND 
zimbra-memcached...NOT FOUND 
zimbra-proxy...NOT FOUND 
zimbra-archiving...NOT FOUND 
zimbra-cluster...NOT FOUND 
zimbra-core...NOT FOUND

PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE. ZIMBRA, INC..

License Terms for the Zimbra Collaboration Suite: 
http://www.zimbra.com/license/zimbra_public_eula_2.1.html
Do you agree with the terms of the software license agreement? [N] Y
Do you agree with the terms of the software license agreement? [N] Y
License Terms for the Zimbra Collaboration Suite: 
http://www.zimbra.com/license/zimbra_public_eula_2.1.html
Do you agree with the terms of the software license agreement? [N] Y
Do you agree with the terms of the software license agreement? [N] Y

4) Press “Y” to accept the License Agreement.

Now the system will check for prerequiesites

Checking for prerequisites... 
FOUND: NPTL 
FOUND: nc-1.84-22 
FOUND: sudo-1.8.6p3-12 
FOUND: libidn-1.18-2 
FOUND: gmp-4.3.1-7 
FOUND: /usr/lib64/libstdc++.so.6
Checking for suggested prerequisites... 
FOUND: perl-5.10.1 
FOUND: sysstat 
FOUND: sqlite

Prerequisite check complete.
Checking for installable packages
Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy

Select the packages to install
Install zimbra-ldap [Y] Y
Install zimbra-logger [Y] Y
Install zimbra-mta [Y] Y
Install zimbra-snmp [Y] Y
Install zimbra-store [Y] Y
Install zimbra-apache [Y] Y
Install zimbra-spell [Y] Y
Install zimbra-memcached [N] Y
Install zimbra-proxy [N] Y
Checking required space for zimbra-core
Checking space for zimbra-store
Installing: 
zimbra-core 
zimbra-ldap 
zimbra-logger 
zimbra-mta 
zimbra-snmp 
zimbra-store 
zimbra-apache 
zimbra-spell 
zimbra-memcached 
zimbra-proxy

5) Press “Y” to install all the required packages and “N” for the rest that we don’t want to install.

6) Now press “Y” to continue after that system will be modified with the above selected installation packages.

The system will be modified.  Continue? [N] Y
Removing /opt/zimbra
Removing zimbra crontab entry...done.
Cleaning up zimbra init scripts...done.
Cleaning up /etc/ld.so.conf...done.
Cleaning up /etc/security/limits.conf...done.
Finished removing Zimbra Collaboration Server.

Installing packages
zimbra-core......zimbra-core-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done 
zimbra-ldap......zimbra-ldap-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-logger......zimbra-logger-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-mta......zimbra-mta-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-snmp......zimbra-snmp-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-store......zimbra-store-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-apache......zimbra-apache-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-spell......zimbra-spell-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-memcached......zimbra-memcached-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
zimbra-proxy......zimbra-proxy-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
Operations logged to /tmp/zmsetup.12152013-081656.log
Installing LDAP configuration database...done.

Setting defaults...

7) During the installation process it might gives DNS error to change hostname which should be resolvable.

Press “Y” to change domain name
DNS ERROR resolving MX for zimbra.nextstep4itmail.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
Create domain: [zmail.uniglory-bd.com] uniglory-bd.com                                            
MX: zmail.uniglory-bd.com (27.147.136.x) 
Interface: 27.147.136.x
Interface: 2a00:1a48:7807:102:c7d4:45f6:ff08:2209
Interface: 127.0.0.1
Interface: ::1
done.

Next you will come to the Main Menu which will show your configuration. Select #3 then change the Admin Password under option #4 next hit r to go back.

*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes] Yes
Save config in file: [/opt/zimbra/config.10975] 
Saving config in /opt/zimbra/config.10975...done.
The system will be modified - continue? [No] Yes
Operations logged to /tmp/zmsetup.12152013-081656.log
Setting local config values...

 

8) Now to apply all the change press “a” then press “YES” to save the configuration data to a new file and type “YES” to continue system modifications.

The setup will take few minutes to implement all configuration changes, after configurations completion notice press “Enter” to exit.

Now do the following steps to run the server properly

1) Restart Crond service and Enable it to start automatically

#systemctl enable crond
#systemctl restart crond

2) Go to rsyslog.conf file and uncomment the below two lines under UDP syslog reception

#vi /etc/rsyslog.conf
Uncomment these two lines
$modload imupd
$UDPServerRun514

3) Restart the rsyslogd service and enable it permanently

#systemctl enable rsyslog
#systemctl restart rsyslog

4) Now run following command to Update /etc/rsyslog.conf

# /opt/zimbra/libexec/zmsyslogsetup

5) Now go to zimbra user account and execute following two commands and then restart Zimbra services

#su – zimbra
$ zmupdateauthkeys
Updating keys for zmail.uniglory-bd.com
Fetching key for zmail.uniglory-bd.com
Updating keys for zmail.uniglory-bd.com
Updating /opt/zimbra/.ssh/authorized_keys
$zmcontrol restart
$zmcontrol status

Now let’s open any of your favourite web browser to access Zimbra Administration Console using the configured Zimbra domain name or IP with user admin and password same as setup in the script:

https://zmail.uniglory-bd.com:7071
https://27.147.136.x:7071

admin_login

Congratulations! Zimbra Collaboration Suite has been setup successfully with Open Source Edition using Single Server Installation.

Conclusion

Zimbra Collaboration Open Source Edition provides great features for administration and to the end users. It has an excellent ‘web’ version. Many people find it their favorite way to use email after trying it for awhile, even if they were used to another program like Outlook or Thunderbird other than its features like a calendar and task function to help coordinate schedules and plan meetings etc.

LEAVE A REPLY

Please enter your comment!
Please enter your name here