Zimbra Mail Server Installation on Centos 7/8
What is Zimbra?
Zimbra or also known as Zimbra Collaboration Suite ZCS, is a major mail and calendar client/server at an organizational level which comes in an open source, free and downloadable edition based on the AJAX programming language (Javascript + XML) which has strategic partners (Partners) such as Red Hat, HP, Intel among others. In addition, it supports POP and IMAP access, which are standard Internet protocols for email, allowing the email server to access the email accounts of your web space; includes anti-spam and antivirus protection. On the other hand, Zimbra consists of Open Source projects or collaborative software such as MTA (postfix), Database (MariaDB), LDAP and MailboxdUI, among others.
In order to install and configure Zimbra on a CentOS 8 server through command lines and a graphical interface, a series of steps must be followed which will allow its correct installation. In addition, it is of the utmost importance before starting the installation of Zimbra on CentOS 8 to meet certain system requirements for its proper functioning.
Requirements
8 GB of RAM (minimum 4 GB of RAM for installation)
Separate partition as /opt with at least 5GB free space
Fully qualified domain name (FQDN), such as 'mail.itinfs.com'
Public IP to have a stable Internet connection and Fixed IP for the domain (DNS)
Data for the own DNS configuration for the installation are:
Hostname: mail.itinfs.com
Domain: itinfs.com
IP address: 192.168.1.254
DNS server: 192.168.1.253
SELinux: enabled
Firewall: Enabled
Assign static IP on Centos
Another important configuration before continuing the installation is the configuration of an IP, to obtain the name of the network interface of the server execute the command:
ip addr
Then, with the obtained name, modify the configuration, for the example the network interface is called enp0s3 :
nano /etc/sysconfig/network-scripts/ifcfg-enp0s3
The content of the file should be similar to the following:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=745fbd71-75e2-4a58-97d2-4c7044a8edfe
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.1.254
PREFIX=24
GATEWAY=192.168.1.1
DNS1=192.168.1.253
In the previous configuration IPADDR indicates the IP address (192.168.1.254) of the server that is being configured, DNS1 is the IP address (192.168.1.253) of the DNS server where the MX record pointing to the IP address (192.168. 1.254) the new mail server that is being configured.
CentOS 7 only allows fully qualified domain names (FQDNs), the hostname change is done with the following command:
hostnamectl set-hostname mail.itinfs.com
Where mail.itinfs.com is the new host name.
Edit the /etc/hosts file
nano /etc/hosts
In the text editor, find the line that starts with 127.0.0.1:
127.0.0.1 localhost localhost.localdomain localhost 4 localhost4.localdomain4
Change the input as follows:
127.0.0.1 localhost localhost.localdomain localhost 4 localhost4.localdomain4 mail.itinfs.com
Save the file and exit.
Check hostname
Restart the server, then verify that the changes have been made with the command:
hostnamectl
It is important to choose the proper hostname before configuring Zimbra, this name will be used during the rest of the configuration, and the service published by zimbra will refer to the same hostname. In a previous step this name was configured, now it will be configured so that the server can resolve the host name with the IP address.
nano /etc/hosts
The file content should be similar to:
192.168.1.254 mail.itinfs.com mail
Hint : Add the above configuration as the first line of the file.
DNS SERVER CONFIGURATION
Before moving on to the Zimbra installation steps, let's check the DNS (A and MX) records for our Zimbra server, log in to your CentOS 8/RHEL 8 system and use the dig command to query the DNS records, we use below command to query the A record of our Zimbra server
dig -t A mail.itinfs.com
And then we query the MX record of our domain itinfs.com with the command
dig -t MX itinfs.com
Firewall Settings
It is recommended to have ports 25,80,110,143,443,465,587,993,995,9071,7071 and 11371 enabled in the server firewall.
firewall-cmd --permanent --add-port={25,80,110,143,443,465,587,993,995,9071,7071,11371}/tcp
firewall-cmd –reload
It is important to enable port 11371, otherwise during the installation you could get an error similar to the following:
ERROR: Unable to retrive Zimbra GPG key for package validation
Please fix system to allow normal package installation before proceeding
Installing Zimbra 8
Download Zimbra
Download the most suitable package for centos 7 or centos 8, for this example the Centos 7 package will be used.
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz
Unzip the installation package
tar xvf zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz
Start the installation
To start the zimbra installation, you must first access the directory created when extracting the installation package:
cd zcs-8.8.15_GA_3869.RHEL7_64.20190918004220/
Start the installation:
./install.sh
After executing the command, the following messages will be displayed on the screen:
Operations logged to /tmp/install.log.rutpGyLB
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
----------------------------------------------------------------------
The license terms must be accepted:
Do you agree with the terms of the software license agreement? [N] Y
It is recommended to use the zimbra repositories to download all the necessary packages:
Use Zimbra's package repository [Y] Y
Importing Zimbra GPG key
Configuring package repository
In the next step, the packages to be installed must be selected:
Select the packages to install
Install zimbra-ldap [Y]
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-dnscache [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-proxy [Y]
Install zimbra-drive [Y]
Install zimbra-imapd (BETA - for evaluation only) [N] N
Install zimbra-chat [Y]
After selecting the packages, the installer will ask you to confirm if you want to continue with the installation:
The system will be modified. Continue? [N] Y
If you have tried multiple times to install on the same server, but different errors did not allow you to continue with it, the following message will probably be displayed after the last question:
Unable to find missing packages in repository. System is not modified.
To fix it run:
rm -rf /var/cache/yum
Then restart the installation with the command:
./install.sh
It is necessary to ensure that the server has enough bandwidth to prevent errors during the download of the installation packages, if everything goes well you will see a message like this:
Downloading packages (11):
zimbra-core-components
zimbra-ldap-components
zimbra-mta-components
zimbra-dnscache-components
zimbra-snmp-components
zimbra-store-components
zimbra-jetty-distribution
zimbra-apache-components
zimbra-spell-components
zimbra-memcached
zimbra-proxy-components
…
If any errors related to DNS are found, they do not need to be corrected at this time, the domain can be configured in a later step:
DNS ERROR resolving MX for mail.itinfs.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] No
In the following steps choose option 7 first and then option 4 to change the administrator password:
4) Admin Password UNSET
After typing the password press the letter r to return to the previous screen, press the letter a to apply the last changes made.
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.14282]
Saving config in /opt/zimbra/config.14282...done.
The system will be modified - continue? [No] Yes
Finally, if everything went well when trying to access the zimbra administration interface, you will have a screen similar to the following: https://mail.itinfs.com:7071/zimbraAdmin/
Post a Comment