Contents
There are several stages that must be done in order. In my case, I created a summary table of the servers we will install later. There are 4 servers in total, see the table below.
| No | Server | Server IP address | Hostname |
|---|---|---|---|
| 1 | LDAP and DNS Server | 192.168.100.100 | ldap.kerimkoc.local |
| 2 | Mailbox 1 | 192.168.100.101 | mbox1.kerimkoc.com |
| 3 | Transport/MTA/Proxy | 192.168.100.102 | mta.kerimkoc.com |
| 4 | Mailbox 2 | 192.168.100.103 | mbox2.kerimkoc.com |
Table plan for the Zimbra multi-server installation.
To make access easier for users later, I will create a global domain host access as a proxy.
Global Access Email Server ==> 192.168.100.102 mail.kerimkoc.com
This way, users do not have to know the hostname of each server individually. They only need to know the one server that will be accessed.
In my case, I will use three server scopes based on the service provided. These are Zimbra LDAP, Mailbox and MTA.
Zimbra Multi-Server Installation Order on Ubuntu
Before starting the installation process, we will first prepare a roadmap for the Zimbra multi-server installation on Ubuntu 20.04.
- ZCS LDAP server(s) with additional services:
- DNS, use Bind
- NTP,Required system clocks are synchronized on all servers.
- ZCS Mailbox server(s) options:
- Zimbra Logger
- ZCS Mailbox server(s)
- Zimbra Web Application
- ZCS MTA server(s) with additional services:
- Zimbra Memcache.
- Zimbra Proxy.
- AS/AV.
Preparing for Zimbra LDAP
Steps 1 to 3 are performed for each server to be installed. Open an SSH session on the Zimbra server and follow the steps below:
Set /etc/hosts and a Static IP Address for LDAP
In this case, I use 192.168.100.100 for Zimbra LDAP.
root@ldap:~# nano /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
dhcp4: no
addresses:
- 192.168.100.100/24
gateway4: 192.168.100.1
nameservers:
addresses: [192.168.100.100, 8.8.8.8]
version: 2
netplan apply. and then set up /etc/hosts.conf.
root@ldap:~# nano /etc/hosts
127.0.0.1 localhost
192.168.100.100 ldap.kerimkoc.local ldap
192.168.100.101 mbox1.kerimkoc.com mbox1
192.168.100.102 mta.kerimkoc.com mta
192.168.100.103 mbox2.kerimkoc.com mbox2
Setting the Hostname and Date/Time
This is the command to set the hostname on Ubuntu.
hostnamectl set-hostname ldap.kerimkoc.local
And then set the time and date.
timedatectl set-timezone Europe/Istanbul
Disable the firewall
Why disable the firewall? I prefer to disable the firewall because:
- The servers are in the DMZ zone. The firewall role is handled by the router, so this can reduce resource usage.
- It minimizes troubleshooting of open ports and closed communication ports between servers. It also avoids service security internal permission and denial as with
selinuxon CentOS/Red Hat andapparmoron Ubuntu.
systemctl stop apparmor.service
systemctl disable apparmor.service
systemctl stop ufw.service
systemctl disable ufw.service
Install the NTP Server.
Set up the NTP Server on the LDAP Server. Why should you install NTP on LDAP? This LDAP server must be run first in the Zimbra multi-server setup.
apt install ntp ntpdate
Change the ntp server in the /etc/ntp.conf file. Allow only the local subnet to query the time server.
restrict 192.0.0.0 mask 255.0.0.0 nomodify notrap
And then restart the NTP service.
systemctl restart ntp
Install DNS Bind
Install DNS Bind for the local authoritative server.
apt install bind9
Change the named.conf.options file.
# nano /etc/bind/named.conf.options
recursion yes;
allow-query { 127.0.0.1; 192.0.0.0/8; };
allow-transfer { none; };
forwarders { 8.8.8.8; 1.1.1.1; };
listen-on port 53 { 127.0.0.1; 192.168.100.100; };
version "not current available";
querylog yes;
Edit the /etc/bind/named.conf.local file.
# nano /etc/bind/named.conf.local
zone "kerimkoc.com" {
type master;
file "/etc/bind/db.kerimkoc.com";
};
Create the /etc/bind/db.kerimkoc.com file
# nano/etc/bind/db.kerim.koc
$TTL 604800
@ IN SOA ns1.kerimkoc.com. root.kerimkoc..com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns1.kerimkoc.com.
@ IN A 192.168.100.102
@ IN MX 0 mail.kerimkoc.com.
ldap IN A 192.168.100.100
ns1 IN A 192.168.100.100
mbox1 IN A 192.168.100.101
mta IN A 192.168.100.102
mbox2 IN A 192.168.100.103
mail IN A 192.168.100.102
When finished, restart the bind service.
root@ldap:/# systemctl restart bind9.service
root@ldap:/# systemctl status bind9.service
● named.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-07-28 11:05:28 WIB; 7s ago
Docs: man:named(8)
Main PID: 125121 (named)
Tasks: 8 (limit: 1037)
Memory: 17.0M
CGroup: /system.slice/named.service
└─125121 /usr/sbin/named -f -u bind
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: configuring command channel from '/etc/bind/rndc.key'
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: command channel listening on ::1#953
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: managed-keys-zone: loaded serial 3
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: zone 0.in-addr.arpa/IN: loaded serial 1
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: zone 127.in-addr.arpa/IN: loaded serial 1
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: zone 255.in-addr.arpa/IN: loaded serial 1
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: zone localhost/IN: loaded serial 2
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: zone kerimkoc.com/IN: loaded serial 2
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: all zones loaded
Jul 28 11:05:28 ldap.kerimkoc.com named[125121]: running
On this LDAP Server, stop and disable the systemd-resolved.service service. This is because the resolver role is handled by bind9.service. After that, recreate the /etc/resolv.conf file
# systemctl stop systemd-resolved.service
# systemctl disable systemd-resolved.service
# rm -rf /etc/resolv.conf
# nano /etc/resolv.conf
nameserver 127.0.0.1
domain kerimkoc.com
Test the lookup with the 127.0.0.1 response form and make sure the name server is working properly
root@ldap:/# nslookup ldap.kerimkoc.local
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: ldap.kerimkoc.local
Address: 192.168.100.100
root@ldap:/# nslookup mail.kerimkoc.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: mail.kerimkoc.com
Address: 192.168.100.102
root@ldap:/# nslookup mbox1.kerimkoc.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: mbox1.kerimkoc.com
Address: 192.168.100.101
root@ldap:/# nslookup mta.kerimkoc.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: mta.kerimkoc.com
Address: 192.168.100.102
Install Zimbra LDAP
First download the tarball from the official repository.
REMEMBER. On this server, install only the zimbra-ldapservice.
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
tar -zxvf zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
cd zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954
./install.sh
Operations logged to /tmp/install.log.v39fi0HW
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
----------------------------------------------------------------------
Do you agree with the terms of the software license agreement? [N] y
Use Zimbra's package repository [Y]
Warning: apt-key output should not be parsed (stdout is not a terminal)
Importing Zimbra GPG key
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)
Select the packages to install
Install zimbra-ldap [Y]
Install zimbra-logger [Y] n
Install zimbra-mta [Y] n
Install zimbra-dnscache [N] n
Install zimbra-snmp [Y] n
Install zimbra-store [Y] n
Install zimbra-apache [Y] n
Install zimbra-spell [Y] n
Install zimbra-memcached [Y] n
Install zimbra-proxy [Y] n
Checking required space for zimbra-core
Installing:
zimbra-core
zimbra-ldap
The system will be modified. Continue? [N]
Exit? [N] n
The system will be modified. Continue? [N] y
Beginning Installation - see /tmp/install.log.v39fi0HW for details...
...
...
Running Post Installation Configuration:
Operations logged to /tmp/zmsetup.20220410-123639.log
Installing LDAP configuration database...done.
Setting defaults...
DNS ERROR resolving MX for ldap.kerimkoc.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes]
Create domain: [ldap.kerimkoc.com] kerimkoc.com
done.
Checking for port conflicts
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
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) 1
Common configuration
1) Hostname: ldap.kerimkoc.com
2) Ldap master host: ldap.kerimkoc.com
3) Ldap port: 389
4) Ldap Admin password: set
5) Store ephemeral attributes outside Ldap: no
6) Secure interprocess communications: yes
7) TimeZone: Europe/Istanbul
8) IP Mode: ipv4
9) Default SSL digest: sha256
Select, or 'r' for previous menu [r] r
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
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]
Save config in file: [/opt/zimbra/config.12512]
...
...
Configuration complete - press return to exit
After the Zimbra LDAP installation is complete. Check the status
zimbra@ldap:~$ zmcontrol status
Host ldap.kerimkoc.com
ldap Running
stats Running
zmconfigd Running