Install Zimbra mail server in CentOS 7


This entry is part 3 of 7 in the series Install Zimbra Mail Server 8.8.12

SystemMen - In this article, I will guide you to install Zimbra mail server in CentOS 7.

Over the last 2 articles in this serie, you have finished preparing the server for installing Zimbra. Now we will do that.

Remove Postfix and install dependencies

First, you need to turn off the Postfix service if it is running.

[root@mail ~]# systemctl stop postfix && systemctl disable postfix

Next, you type below command to install dependencies for Zimbra.

[root@mail ~]# yum install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6 wget -y

Download package and install Zimbra 8.8.12 in CentOS 7

First, we will create a folder called zimbra. This folder is for downloading the Zimbra installation package to your server.

[root@mail ~]# mkdir zimbra && cd zimbra

Next, type the following command to download the Zimbra package 8.8.12 to the server.

[root@mail zimbra]# wget https://files.zimbra.com/downloads/8.8.12_GA/zcs-8.8.12_GA_3794.RHEL7_64.20190329045002.tgz

Then, extract the installation package.

[root@mail zimbra]# tar zxpvf zcs-8.8.12_GA_3794.RHEL7_64.20190329045002.tgz

Move to the unzipped folder.

[root@mail zimbra]# cd zcs-8.8.12_GA_3794.RHEL7_64.20190329045002

And finally, type the following command to install Zimbra 8.8.12.

[root@mail zcs-8.8.12_GA_3794.RHEL7_64.20190329045002]# ./install.sh

The installation process will take place as below.

[root@mail zcs-8.8.12_GA_3794.RHEL7_64.20190329045002]# ./install.sh

Operations logged to /tmp/install.log.j5mRhLRW
Checking for existing installation…
    zimbra-drive…NOT FOUND
    zimbra-imapd…NOT FOUND
    zimbra-patch…NOT FOUND
    zimbra-mta-patch…NOT FOUND
    zimbra-proxy-patch…NOT FOUND
    zimbra-license-tools…NOT FOUND
    zimbra-license-extension…NOT FOUND
    zimbra-network-store…NOT FOUND
    zimbra-network-modules-ng…NOT FOUND
    zimbra-chat…NOT FOUND
    zimbra-talk…NOT FOUND
    zimbra-ldap…NOT FOUND
    zimbra-logger…NOT FOUND
    zimbra-mta…NOT FOUND
    zimbra-dnscache…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-core…NOT FOUND


----------------------------------------------------------------------
PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
SYNACOR, INC. ("SYNACOR") 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 this Zimbra Collaboration Suite Software:
https://www.zimbra.com/license/zimbra-public-eula-2-6.html
----------------------------------------------------------------------


Agree with the terms of Zimbra. Type Y.

Do you agree with the terms of the software license agreement? [N] Y




Allow to user Zimbra’s package repository.

Use Zimbra's package repository [Y] Y


Configuring package repository

Checking for installable packages

Found zimbra-core (local)
Found zimbra-ldap (local)
Found zimbra-logger (local)
Found zimbra-mta (local)
Found zimbra-dnscache (local)
Found zimbra-snmp (local)
Found zimbra-store (local)
Found zimbra-apache (local)
Found zimbra-spell (local)
Found zimbra-memcached (repo)
Found zimbra-proxy (local)
Found zimbra-drive (repo)
Found zimbra-imapd (local)
Found zimbra-patch (repo)
Found zimbra-mta-patch (repo)
Found zimbra-proxy-patch (repo)

Type Y to select packages you want to install. We will install these packages: zimbra-ldap, zimbra-logger, zimbra-mta, zimbra-snmp, zimbra-store, zimbra-apache, zimbra-spell, zimbra-memcached, zimbra-proxy.

There are some packages optional: zimbra-drive (use with NextCloud), zimbra-imapd (still BETA), zimbra-chat (not really necessary, users often chat via Skype or some thing like that).

Select the packages to install

Install zimbra-ldap [Y] Y

Install zimbra-logger [Y] Y

Install zimbra-mta [Y] Y

Install zimbra-dnscache [Y] N

Install zimbra-snmp [Y] Y

Install zimbra-store [Y] Y

Install zimbra-apache [Y] Y

Install zimbra-spell [Y] Y

Install zimbra-memcached [Y] Y

Install zimbra-proxy [Y] Y

Install zimbra-drive [Y] Y

Install zimbra-imapd (BETA - for evaluation only) [N] Y

Install zimbra-chat [Y] Y
Checking required space for zimbra-core
Checking space for zimbra-store
Checking required packages for zimbra-store
zimbra-store package check complete.

Installing:
    zimbra-core
    zimbra-ldap
    zimbra-logger
    zimbra-mta
    zimbra-snmp
    zimbra-store
    zimbra-apache
    zimbra-spell
    zimbra-memcached
    zimbra-proxy
    zimbra-drive
    zimbra-imapd
    zimbra-patch
    zimbra-mta-patch
    zimbra-proxy-patch
    zimbra-chat

After this step, you type Y to confirm that the system will be modified and the installation will begin.

The system will be modified.  Continue? [N] Y

Beginning Installation - see /tmp/install.log.j5mRhLRW for details…

                          zimbra-core-components will be downloaded and installed.
                            zimbra-timezone-data will be installed.
                          zimbra-common-core-jar will be installed.
                         zimbra-common-mbox-conf will be installed.
                   zimbra-common-mbox-conf-attrs will be installed.
                    zimbra-common-mbox-conf-msgs will be installed.
                  zimbra-common-mbox-conf-rights will be installed.
                           zimbra-common-mbox-db will be installed.
                         zimbra-common-mbox-docs will be installed.
                   zimbra-common-mbox-native-lib will be installed.
                         zimbra-common-core-libs will be installed.
                                     zimbra-core will be installed.
                          zimbra-ldap-components will be downloaded and installed.
                                     zimbra-ldap will be installed.
                                   zimbra-logger will be installed.
                           zimbra-mta-components will be downloaded and installed.
                                      zimbra-mta will be installed.
                          zimbra-snmp-components will be downloaded and installed.
                                     zimbra-snmp will be installed.
                         zimbra-store-components will be downloaded and installed.
                       zimbra-jetty-distribution will be downloaded and installed.
                                zimbra-mbox-conf will be installed.
                                 zimbra-mbox-war will be installed.
                             zimbra-mbox-service will be installed.
                       zimbra-mbox-webclient-war will be installed.
                   zimbra-mbox-admin-console-war will be installed.
                          zimbra-mbox-store-libs will be installed.
                                    zimbra-store will be installed.
                        zimbra-apache-components will be downloaded and installed.
                                   zimbra-apache will be installed.
                         zimbra-spell-components will be downloaded and installed.
                                    zimbra-spell will be installed.
                                zimbra-memcached will be downloaded and installed.
                         zimbra-proxy-components will be downloaded and installed.
                                    zimbra-proxy will be installed.
                                    zimbra-drive will be downloaded and installed (later).
                                    zimbra-imapd will be installed.
                                    zimbra-patch will be downloaded and installed (later).
                                zimbra-mta-patch will be downloaded and installed.
                              zimbra-proxy-patch will be downloaded and installed (later).
                                     zimbra-chat will be downloaded and installed (later).

Downloading packages (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-snmp-components
   zimbra-store-components
   zimbra-jetty-distribution
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
   zimbra-mta-patch
      …done

Removing /opt/zimbra
Removing zimbra crontab entry…done.
Cleaning up zimbra init scripts…done.
Cleaning up /etc/security/limits.conf…done.

Finished removing Zimbra Collaboration Server.


Installing repo packages (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-snmp-components
   zimbra-store-components
   zimbra-jetty-distribution
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
   zimbra-mta-patch
      …done

Installing local packages (26):
   zimbra-timezone-data
   zimbra-common-core-jar
   zimbra-common-mbox-conf
   zimbra-common-mbox-conf-attrs
   zimbra-common-mbox-conf-msgs
   zimbra-common-mbox-conf-rights
   zimbra-common-mbox-db
   zimbra-common-mbox-docs
   zimbra-common-mbox-native-lib
   zimbra-common-core-libs
   zimbra-core
   zimbra-ldap
   zimbra-logger
   zimbra-mta
   zimbra-snmp
   zimbra-mbox-conf
   zimbra-mbox-war
   zimbra-mbox-service
   zimbra-mbox-webclient-war
   zimbra-mbox-admin-console-war
   zimbra-mbox-store-libs
   zimbra-store
   zimbra-apache
   zimbra-spell
   zimbra-proxy
   zimbra-imapd
      …done

Installing extra packages (4):
   zimbra-drive
   zimbra-patch
   zimbra-proxy-patch
   zimbra-chat
      …done

Start to configure DNS for Zimbra mail server. I have mentioned more details below, please scroll down to the DNS section.

Running Post Installation Configuration:
Operations logged to /tmp/zmsetup.20190521-125010.log
Installing LDAP configuration database…done.
Setting defaults…

DNS ERROR resolving MX for mail.yourdomain.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
Create domain: [mail.yourdomain.com] yourdomain.com
   MX: mail.yourdomain.com (192.168.10.10)

   Interface: 127.0.0.1
   Interface: ::1
   Interface: 192.168.10.10
done.
Checking for port conflicts

The main menu displays for some subsequent settings.

Main menu

   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-logger:                           Enabled
   4) zimbra-mta:                              Enabled
   5) zimbra-snmp:                             Enabled
   6) zimbra-store:                            Enabled
        +Create Admin User:                    yes
        +Admin user to create:                 admin@yourdomain.com
******* +Admin Password                        UNSET
        +Anti-virus quarantine user:           virus-quarantine.exqbgv28@yourdomain.com
        +Enable automated spam training:       yes
        +Spam training user:                   spam.qg1kjm_q@yourdomain.com
        +Non-spam(Ham) training user:          ham.cuhpcmq7h@yourdomain.com
        +SMTP host:                            mail.yourdomain.com
        +Web server HTTP port:                 8080
        +Web server HTTPS port:                8443
        +Web server mode:                      https
        +IMAP server port:                     7143
        +IMAP server SSL port:                 7993
        +POP server port:                      7110
        +POP server SSL port:                  7995
        +Use spell check server:               yes
        +Spell server URL:                     http://mail.yourdomain.com:7780/aspell.php
        +Enable version update checks:         TRUE
        +Enable version update notifications:  TRUE
        +Version update notification email:    admin@yourdomain.com
        +Version update source email:          admin@yourdomain.com
        +Install mailstore (service webapp):   yes
        +Install UI (zimbra,zimbraAdmin webapps): yes

   7) zimbra-spell:                            Enabled
   8) zimbra-proxy:                            Enabled
   9) zimbra-imapd:                            Enabled
  10) Default Class of Service Configuration:
   s) Save config to file
   x) Expand menu
   q) Quit

Choose number 6.

Address unconfigured (**) items  (? - help) 6


Store configuration

   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    admin@yourdomain.com
** 4) Admin Password                           UNSET
   5) Anti-virus quarantine user:              virus-quarantine.exqbgv28@yourdomain.com
   6) Enable automated spam training:          yes
   7) Spam training user:                      spam.qg1kjm_q@yourdomain.com
   8) Non-spam(Ham) training user:             ham.cuhpcmq7h@yourdomain.com
   9) SMTP host:                               mail.yourdomain.com
  10) Web server HTTP port:                    8080
  11) Web server HTTPS port:                   8443
  12) Web server mode:                         https
  13) IMAP server port:                        7143
  14) IMAP server SSL port:                    7993
  15) POP server port:                         7110
  16) POP server SSL port:                     7995
  17) Use spell check server:                  yes
  18) Spell server URL:                        http://mail.yourdomain.com:7780/aspell.php
  19) Enable version update checks:            TRUE
  20) Enable version update notifications:     TRUE
  21) Version update notification email:       admin@yourdomain.com
  22) Version update source email:             admin@yourdomain.com
  23) Install mailstore (service webapp):      yes
  24) Install UI (zimbra,zimbraAdmin webapps): yes

Then choose number 4 and type your new password for admin account.

Select, or 'r' for previous menu [r] 4

Password for admin@yourdomain.com (min 6 characters): [BxHjiQg8m9] YourNewPass

Store configuration

   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    admin@yourdomain.com
   4) Admin Password                           set
   5) Anti-virus quarantine user:              virus-quarantine.exqbgv28@yourdomain.com
   6) Enable automated spam training:          yes
   7) Spam training user:                      spam.qg1kjm_q@yourdomain.com
   8) Non-spam(Ham) training user:             ham.cuhpcmq7h@yourdomain.com
   9) SMTP host:                               mail.yourdomain.com
  10) Web server HTTP port:                    8080
  11) Web server HTTPS port:                   8443
  12) Web server mode:                         https
  13) IMAP server port:                        7143
  14) IMAP server SSL port:                    7993
  15) POP server port:                         7110
  16) POP server SSL port:                     7995
  17) Use spell check server:                  yes
  18) Spell server URL:                        http://mail.yourdomain.com:7780/aspell.php
  19) Enable version update checks:            TRUE
  20) Enable version update notifications:     TRUE
  21) Version update notification email:       admin@yourdomain.com
  22) Version update source email:             admin@yourdomain.com
  23) Install mailstore (service webapp):      yes
  24) Install UI (zimbra,zimbraAdmin webapps): yes

And type r to return previous menu.

Select, or 'r' for previous menu [r] r

Main menu

   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-logger:                           Enabled
   4) zimbra-mta:                              Enabled
   5) zimbra-snmp:                             Enabled
   6) zimbra-store:                            Enabled
   7) zimbra-spell:                            Enabled
   8) zimbra-proxy:                            Enabled
   9) zimbra-imapd:                            Enabled
  10) Default Class of Service Configuration:
   s) Save config to file
   x) Expand menu
   q) Quit

Then type a to apply configuration.

*** 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.16118]
Saving config in /opt/zimbra/config.16118…done.
The system will be modified - continue? [No] Yes
Operations logged to /tmp/zmsetup.20190521-125010.log
Setting local config values…done.
Initializing core config…Setting up CA…done.
Deploying CA to /opt/zimbra/conf/ca …done.
Creating SSL zimbra-imapd certificate…done.
Creating new zimbra-store SSL certificate…done.
Creating new zimbra-ldap SSL certificate…done.
Creating new zimbra-mta SSL certificate…done.
Creating new zimbra-proxy SSL certificate…done.
Installing mailboxd SSL certificates…done.
Installing imapd SSL certificates…done.
Installing MTA SSL certificates…done.
Installing LDAP SSL certificate…done.
Installing Proxy SSL certificate…done.
Initializing ldap…done.
Setting replication password…done.
Setting Postfix password…done.
Setting amavis password…done.
Setting nginx password…done.
Setting BES searcher password…done.
Creating server entry for mail.yourdomain.com…done.
Setting Zimbra IP Mode…done.
Saving CA in ldap…done.
Saving SSL Certificate in ldap…done.
Setting spell check URL…done.
Setting service ports on mail.yourdomain.com…done.
Setting zimbraFeatureTasksEnabled=TRUE…done.
Setting zimbraFeatureBriefcasesEnabled=TRUE…done.
Checking current setting of zimbraReverseProxyAvailableLookupTargets
Querying LDAP for other mailstores
Searching LDAP for reverseProxyLookupTargets…done.
Adding mail.yourdomain.com to zimbraReverseProxyAvailableLookupTargets
Updating zimbraLDAPSchemaVersion to version '1537783098'
Setting TimeZone Preference…done.
Disabling strict server name enforcement on mail.yourdomain.com…done.
Initializing mta config…done.
Setting services on mail.yourdomain.com…done.
Adding mail.yourdomain.com to zimbraMailHostPool in default COS…done.
Creating domain yourdomain.com…done.
Setting default domain name…done.
Creating domain yourdomain.com…already exists.
Creating admin account admin@yourdomain.com…done.
Creating root alias…done.
Creating postmaster alias…done.
Creating user spam.qg1kjm_q@yourdomain.com…done.
Creating user ham.cuhpcmq7h@yourdomain.com…done.
Creating user virus-quarantine.exqbgv28@yourdomain.com…done.
Setting spam training and Anti-virus quarantine accounts…done.
Initializing store sql database…done.
Setting zimbraSmtpHostname for mail.yourdomain.com…done.
Configuring SNMP…done.
Setting up syslog.conf…done.
Enabling IMAP protocol for zimbra-imapd service…done.
Enabling IMAPS protocol for zimbra-imapd service…done.
Starting servers…done.
Installing common zimlets…
   com_zimbra_adminversioncheck…done.
   com_zimbra_attachcontacts…done.
   com_zimbra_attachmail…done.
   com_zimbra_bulkprovision…done.
   com_zimbra_cert_manager…done.
   com_zimbra_clientuploader…done.
   com_zimbra_date…done.
   com_zimbra_email…done.
   com_zimbra_mailarchive…done.
   com_zimbra_phone…done.
   com_zimbra_proxy_config…done.
   com_zimbra_srchhighlighter…done.
   com_zimbra_tooltip…done.
   com_zimbra_url…done.
   com_zimbra_viewmail…done.
   com_zimbra_webex…done.
   com_zimbra_ymemoticons…done.
   com_zextras_drive_open…done.
   com_zextras_chat_open…done.
Finished installing common zimlets.
Restarting mailboxd…done.
Creating galsync account for default domain…done.

You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Server.
The only information that will be transmitted is:
   The VERSION of zcs installed (8.8.12_GA_3794_RHEL7_64)
   The ADMIN EMAIL ADDRESS created (admin@yourdomain.com)

Notify Zimbra of your installation? [Yes] Yes
Notifying Zimbra of installation via http://www.zimbra.com/cgi-bin/notify.cgi?VER=8.8.12_GA_3794_RHEL7_64&MAIL=admin@yourdomain.com

Notification complete

Checking if the NG started running…done.
Setting up zimbra crontab…done.


Moving /tmp/zmsetup.20190521-125010.log to /opt/zimbra/log


Configuration complete - press return to exit

Explain more about the installation steps

Notice that in zimbra-dnscache, we choose N. Because we installed the DNS server on the Zimbra server, so we don’t need to install it anymore.

If you select Y to install zimbra-dnscache, the installation will fail.

Warning: If you have set up a DNS server like I did in the previous article. Select N in zimbra-dnscache.

In the section to check the MX record, Zimbra notifies you of an error. Don’t worry, just type Yes and re-type your domain (not including subdomain mail).

DNS ERROR resolving MX for mail.yourdomain.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
Create domain: [mail.yourdomain.com] yourdomain.com
	MX: mail.yourdomain.com (192.168.10.10)
	Interface: 127.0.0.1
	Interface: ::1
	Interface: 192.168.10.10
done.

Then, the main menu of Zimbra is available. You select number 6 to enter the zimbra-store menu.

Address unconfigured (**) items  (? - help) 6


Store configuration

   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    admin@yourdomain.com
** 4) Admin Password                           UNSET

You can see menu number 4, Admin Password is UNSET. Type number 4 to set the password for admin account.

Look like this.

Select, or 'r' for previous menu [r] 4

Password for admin@yourdomain.com (min 6 characters): [BxHjiQg8m9] YourNewPass

After that, just press r to return to the main menu and press a to apply the changes.

Select, or 'r' for previous menu [r] r

Main menu

   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-logger:                           Enabled
   4) zimbra-mta:                              Enabled
   5) zimbra-snmp:                             Enabled
   6) zimbra-store:                            Enabled
   7) zimbra-spell:                            Enabled
   8) zimbra-proxy:                            Enabled
   9) zimbra-imapd:                            Enabled
  10) Default Class of Service Configuration:
   s) Save config to file
   x) Expand menu
   q) Quit

*** 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

And now, you just need to wait about 5-10 minutes for the installation to finish.

After the installation has finished, you switch to user Zimbra to check the Zimbra service status.

[root@mail ~]# su zimbra
[zimbra@mail root]$ zmcontrol status
Host mail.yourdomain.com
	amavis                  Running
	antispam                Running
	antivirus               Running
	imapd                   Running
	ldap                    Running
	logger                  Running
	mailbox                 Running
	memcached               Running
	mta                     Running
	opendkim                Running
	proxy                   Running
	service webapp          Running
	snmp                    Running
	spell                   Running
	stats                   Running
	zimbra webapp           Running
	zimbraAdmin webapp      Running
	zimlet webapp           Running
	zmconfigd               Running
[zimbra@mail root]$

Open the firewall port for Zimbra

For CentOS 7, it uses firewalld. Type the following commands to open the necessary ports for Zimbra.

[root@mail ~]# firewall-cmd --permanent --add-port={25,80,110,143,443,465,587,993,995,5222,5223,9071,7071}/tcp
success
[root@mail ~]# firewall-cmd --reload
success
[root@mail ~]#

Warning: Note that port 7071 is for admin. Therefore, consider accessing it via VPN or having a second security mechanism for it.

Access the Zimbra admin for the first time

Now, open your browser and type in the url: https://mail.yourdomain.com:7071

install-zimbra-mail-server-in-centos-7-01 Install Zimbra mail server in CentOS 7
Access the admin page of Zimbra.

Then, login your admin account.

install-zimbra-mail-server-in-centos-7-02 Install Zimbra mail server in CentOS 7
Login admin account to new Zimbra mail server in CentOS 7

Notice the upper right corner of the window, the Service section should be Running. Or you can wait for 1-2 minutes for the window to update status.

If you still don’t run, you need to restart the Zimbra service.

Conclusion

So, I have guided you step by step to successfully install Zimbra mail server 8.8.12 in CentOS 7. In the next articles, I will guide you how to set up your mail server can send email to Gmail.

Continue reading the series«« Previous part: Install NTP and DNS for Zimbra mail serverNext part: Configure DKIM for Zimbra mail server 8.8.12 »»


«« »»