In this how-to guide, we shall be looking at how we can set up the Zimbra Collaboration tool in an Alibaba Cloud ECS instance running Ubuntu 18.04. Specifically, we shall be installing the Zimbra version 8.8 community edition in a single server setup. Also, note that you can have a multi-server setup as well but our focus in this article is only the single server setup. First launched in 2005, Zimbra Collaboration Suite incorporates both email and web clients to facilitate organizational collaboration. Zimbra Inc, the company behind the software provides both a freely available open-source version and a commercial paid-for version. Our focus in this tutorial is the open source version, which we shall be installing in our ECS instance.
So, What Are the System Requirements for the Installation?
The system requirements for your VPS are as listed below:
- An Alibaba ECS instance running Ubuntu 18.04 setup
- You should have SSH access to your instance
- A user with sudo privileges on your ECS instance
- A DNS server installed on your system such as Dnsmasq
Our objective is to support an organization with about 50 users. Zimbra recommends the following specifications for your VPS to sufficiently meet such a use case:
- Minimum 2.0 GHz CPU/Processor
- 8 GB of RAM for a single server installation
- A minimum of 10 GB installed storage capacity for software and logs
- An additional installed capacity for mail and files storage, about 50 GB should be good enough for a start.
- For better performance, it is recommended that you use SATA or SCSI and for redundancy, make use of RAID/Mirroring
Zimbra advises that you should install LibreOffice in your server to be able to access its high-fidelity document preview feature when interacting with the package. Zimbra detects the presence of LibreOffice automatically and once installed it enables the use of high-fidelity document preview. Document preview is very important but Zimbra also includes a Zimbra Docs packages for this purpose.
For the preparation, begin with the step below:
sudo apt-get update && apt-get upgrade
Next, install the LibreOffice package by running the command below:
sudo apt-get install libreoffice
Run the commands below to install requisite language packages and fonts, especially for viewing documents in East Asian languages: If you are using English, you may skip this step:
sudo apt-get install libreoffice-l10n-*
sudo apt-get install fonts-vlgothic
Our server is now prepared for the installation process, which we shall be going through in the next few steps.
Step 1: Downloading Zimbra Collaboration Tool
We shall be working with the community edition of the Zimbra Collaboration software, version 8.8. Run the command below to download version 8.8.9 to a local server:
Now run the command below to extract the files:
tar xvf zcs-8.8.9_GA_3019.UBUNTU16_64.20180809160254.tgz
Run the command below to change to zcs- directory:
Step 2: Installation and Configuration of the DNS Server
This step is very crucial since Zimbra verifies that you have MX records configured with your domain as the installation process runs. A misconfiguration results in an error. Furthermore, Zimbra requires A and MX records of the DNS to forward and receive emails. In this section, we shall install Dnsmasq for our DNS configuration.
The first step when installing Dnsmasq is to disable systemd-resolve since it usually conflicts Dnsmasq by binding to port 53. The commands below will resolve the problem:
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
Next, follow the below step to remove
resolv.conf symlinked file:
$ ls -lh /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Dec 3 15:46 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
$ sudo rm /etc/resolv.conf
Now we need to create a new replacement for the resolv.conf file like so:
echo "nameserver 22.214.171.124" > /etc/resolv.conf
Now, run the command below to install Dnsmasq:
sudo apt-get install dnsmasq
Now we shall proceed to modify the configuration file located at
/etc/dnsmasq.conf to introduce new configurations. Follow the steps below:
sudo nano /etc/dnsmasq.conf
Below is one way to make the configuration adjustments.
# Now we shall set the port where listening shall occur
# (53). You can disable DNS by setting the Port to 0,
# which means only DHCP or TFTP shall be available.
# A domain must be an actual domain, do not forward plain text
# only forward addresses to the routed address spaces for this to work
# Usually, queries from Dnsmasq are served to upstream servers that are
# known to be running. You can have each server queried in the order they
# are organized in the /etc/resolv.conf file by uncommenting this section.
# if you want to use a simple hosts file where a domain name is added to
# the file automatically then you should have this setting.
# this allows you to set dnsmasq's domain, but it not mandatory. If set, it
# will do the following:
# -) Your DHCP hosts will have access to domain names that you have pre-
# qualified yourself, provided that they match what is provided here.
# -) the DHCP can be able to access and configure the domain used in all
# systems by including a "domain" option for DHCP.
# -) the 'expanded-hosts' can now have a domain part
domain=mydomain.co.ke# Define the Listening address
# The address should be the IP of your server
Furthermore, you can include a setting for DNSSEC validation and cache by uncommenting on the below:
Below is a sample edited DNS for a certain environment:
root@zcs-886:~# nano /etc/dnsmasq.conf
If you need to make any other changes, do as necessary and then run the command below to restart Dnsmasq.
sudo systemctl restart dnsmasq
You can test the A record of your Zimbra server by running a Dig test like so:
# dig A mx-01.zimbra.mydomain.co.ke
This command should yield a result as the one indicated below:
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> A mx-01.zimbra.mydomain.co.ke
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40465
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0;; QUESTION SECTION:
;mx-01.zimbra.mydomain.co.ke. IN A;; ANSWER SECTION:
mx-01.zimbra.mydomain.co.ke. 0 IN A 192.168.153.117
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Dec 3 18:34:01 UTC 2018
;; MSG SIZE rcvd: 68
Now, you can also do an MX dig by using the command below:
# dig MX zimbra.mydomain.co.ke
If all is well, we can now proceed to download the Zimbra collaboration tool in the next step.
Step 3: The Installation Process
Now, pay close attention to this section because you shall require something a bit outside the box. We shall be adding an Ubuntu 16.04 repository since a package for Ubuntu 18.04 is not available yet.
The Zimbra repository for Ubuntu 16.04 should be added to the
/etc/apt/sources.list.d/zimbra.listdirectory. It should be done like so:
# cat /etc/apt/sources.list.d/zimbra.list
deb [arch=amd64] https://repo.zimbra.com/apt/87 xenial zimbra
deb [arch=amd64] https://repo.zimbra.com/apt/889 xenial zimbra
deb-src [arch=amd64] https://repo.zimbra.com/apt/87 xenial zimbra
Next, we need to import the GPG key like so:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9BE6ED79
Next, run an update for the apt index like so:
$ sudo apt-get update
Allow the update to run to completion and then run the command below to start the installation process:
We have included the option above to avoid the limitations of an unknown OS.
Once the process of installation starts running, you should see something like the one below:
operations logged to /tmp/install.log.xGLw1m7m
Checking for existing installation...
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:
Do you agree with the terms of the software license agreement? [N] yUse Zimbra's package repository [Y]
Configuring package repository
Checking for installable packagesFound 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)
Select the packages to installInstall 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-memcached [Y]
Install zimbra-proxy [Y]
Install zimbra-drive [Y]
Install zimbra-imapd (BETA - for evaluation only) [N]
Install zimbra-chat [Y]
Checking required space for zimbra-core
Checking space for zimbra-store
Checking required packages for zimbra-store
zimbra-store package check complete.
The system will be modified. Continue? [N] y
Downloading packages (11):
Allow all packages to download and then proceed to set the administrator password
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: firstname.lastname@example.org
** 4) Admin Password UNSET
5) Anti-virus quarantine user: email@example.com
6) Enable automated spam training: yes
7) Spam training user: firstname.lastname@example.org
8) Non-spam(Ham) training user: email@example.com
9) SMTP host: zimbra.mydomain.co.ke
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://zimbra.mydomain.co.ke:7780/aspell.php
19) Enable version update checks: TRUE
20) Enable version update notifications: TRUE
21) Version update notification email: firstname.lastname@example.org
22) Version update source email: email@example.com
23) Install mailstore (service webapp): yes
24) Install UI (zimbra,zimbraAdmin webapps): yes Select, or 'r' for the previous menu [r] 4Password for firstname.lastname@example.org(min 6 characters): [rt78782GH]
Now follow the following configurations to complete the process and effect the changes
*** 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.22612]
Saving config in /opt/zimbra/config.22612...done.
The system will be modified - continue? [No] yes
Allow the process to run to completion, upon which you should receive a notification at the end confirming the completion of the process.
Configuration complete - press return to exit
Now, for you to access the admin panel, type the address in the format below in a browser:
Zimbra is an integrated suite of solutions ranging from chat, collaboration and messaging, simplistic administration, versatile, integrated web experience and the flexibility of deployment on devices. The web client enables users to interact and share moods and feelings. What’s more, it enables users to connect on personal clouds and work both online and offline with other productivity tools such as Microsoft Outlook. On the whole, Zimbra is a productivity booster that is easy to use, robust and easily customizable. Hope you enjoyed this tutorial and that you will get to experience the full collaborative experience of Zimbra on Alibaba Cloud. Cheers!