Install Zimbra Proxy: 6 Easy Steps and 2 Mistakes to Avoid
To install Zimbra proxy you run the normal Zimbra installer on a separate server, select only two packages (zimbra-proxy and zimbra-memcached) and point the proxy to the LDAP master of your Zimbra environment. This guide shows the complete installation on a CentOS/RHEL 6 server with Zimbra 8.6.0 (open source), using the real installer output from that run, and explains each choice with the Zimbra Administrator Guide. The old post showed an example password in the menu; all passwords are replaced by placeholders here.
Contents
- Why install Zimbra proxy: what it does
- Step 1: download the installer to install Zimbra proxy
- Step 2: install Zimbra proxy with only two packages
- Step 3: connect the Zimbra proxy to the LDAP master
- Step 4: configure the ports to install Zimbra proxy correctly
- Step 5: apply the configuration of the Zimbra proxy
- Step 6: check the proxy after you install Zimbra proxy
- Mistakes to avoid when you install Zimbra proxy
- FAQ
- Do I have to install Zimbra proxy on its own server?
- How is a proxy different from the mailbox server when I install Zimbra proxy?
- How do I undo it after I install Zimbra proxy?
- References
Why install Zimbra proxy: what it does
The Administrator Guide describes Zimbra Proxy as a high-performance proxy that reverse proxies IMAP, POP3 and HTTP client requests to a set of backend servers. It centralizes access to the mailbox servers and gives you load balancing, authentication, SSL termination, caching and central logging. It consists of Nginx (handles all incoming HTTP, POP and IMAP requests), Memcached (caches the routing information, by default for one hour) and the Route Lookup Handler servlet on the mailbox server (returns the server and port where an account lives). That is why you install exactly two packages on the proxy host when you install Zimbra proxy.
Before you install Zimbra proxy, decide where it runs. You can put the proxy package on a mailbox server, on an MTA server or, as here, on its own independent server. The proxy server in this example is proxy.huuphan.local and the LDAP master is ldap-m01.huuphan.local; the setup is part of the multi server installation described in the post on how to install and configure Zimbra multi server.
Step 1: download the installer to install Zimbra proxy
Download the Zimbra open source archive for your platform, extract it and start the installer as root:
wget -c https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL6_64.20141215151155.tgz -O zimbra-8.6.0_GA.tgz
tar zxvf zimbra-8.6.0_GA.tgz
cd zimbra-8.6.0_GA
./install.sh
The installer logs to /tmp/install.log.*, checks for an existing installation (here every package is reported NOT FOUND), shows the license agreement and asks Do you agree with the terms of the software license agreement? [N]; answer Y. It then checks the prerequisites (NPTL, nc, sudo, libidn, gmp, libaio, libstdc++, unzip and, as suggested, perl, sysstat and sqlite) and prints Prerequisite check complete. Install missing prerequisites with the package manager before you continue.
Step 2: install Zimbra proxy with only two packages
The installer lists the packages it found and asks for each one. Answer N for everything except memcached and proxy; zimbra-core is always installed:
Select the packages to install
Install zimbra-ldap [Y] N
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] Y
Install zimbra-proxy [Y] Y
Checking required space for zimbra-core
Installing:
zimbra-core
zimbra-memcached
zimbra-proxy
The system will be modified. Continue? [N] Y
After the confirmation the installer removes leftovers of an earlier Zimbra ("Removing /opt/zimbra ... Finished removing Zimbra Collaboration Server.") and installs the three RPM packages:
Installing packages
zimbra-core......zimbra-core-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done
zimbra-memcached......zimbra-memcached-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done
zimbra-proxy......zimbra-proxy-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done
Step 3: connect the Zimbra proxy to the LDAP master
The configuration menu starts with two unconfigured items, marked with stars: the LDAP master host and the LDAP admin password. Choose 1) Common Configuration, then item 2 and type the host name of the LDAP master, then item 4 for the password:
Please enter the ldap server hostname: ldap-m01.huuphan.local
Password for ldap admin user (min 6 characters): <ldap-admin-password>
Setting defaults from ldap...done.
The line "Setting defaults from ldap...done." shows that the proxy server could reach the LDAP master and read the existing configuration. If this step fails, check DNS, the firewall (LDAP port 389) and the password before you go on. The common settings stay as the installer proposes: LDAP port 389, LDAP base DN cn=zimbra, secure interprocess communications yes, IP mode ipv4, default SSL digest sha256; set the time zone to your own (here Asia/Bangkok).
Step 4: configure the ports to install Zimbra proxy correctly
Go back and open 2) zimbra-proxy. Set the password for the LDAP Nginx user (item 11); the installer offers a random one in brackets, which is a safe choice. The resulting ports match the table of the Administrator Guide:
2) zimbra-proxy: Enabled
+Enable POP/IMAP Proxy: TRUE
+IMAP server port: 7143
+IMAP server SSL port: 7993
+IMAP proxy port: 143
+IMAP SSL proxy port: 993
+POP server port: 7110
+POP server SSL port: 7995
+POP proxy port: 110
+POP SSL proxy port: 995
+Bind password for nginx ldap user: set
+Enable HTTP[S] Proxy: TRUE
+Web server HTTP port: 8080
+Web server HTTPS port: 8443
+HTTP proxy port: 80
+HTTPS proxy port: 443
+Proxy server mode: https
Clients connect to the "proxy port" values (80, 443, 110, 995, 143, 993); the "server port" values (8080, 8443, 7110, 7995, 7143, 7993) are the backend ports on the mailbox servers, as in the guide's proxy port table. The proxy server mode is https, so web clients use HTTPS.
Step 5: apply the configuration of the Zimbra proxy
When no starred item is left, the menu prints *** CONFIGURATION COMPLETE - press 'a' to apply. Press a, accept the proposed file name to save the configuration (here /opt/zimbra/config.3396) and confirm that the system will be modified:
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.3396]
The system will be modified - continue? [No] Yes
The configuration then runs through its steps. The lines that matter for the proxy are:
Setting local config values...done.
Setting up CA...done.
Creating zimbra-proxy SSL certificate...done.
Installing Proxy SSL certificate...done.
Creating server entry for proxy.huuphan.local...done.
Setting services on proxy.huuphan.local...done.
Starting servers...done.
Skipping creation of default domain GAL sync account - existing install detected.
Configuration complete - press return to exit
The installer also offers to notify Zimbra of the installation; answer as your policy requires, because it sends the version and the admin address to Zimbra.
Step 6: check the proxy after you install Zimbra proxy
As the zimbra user on the proxy server, check the services with zmcontrol status; the proxy and memcached services should be running. From a client, connect to https://proxy.huuphan.local and to the IMAP and POP ports of the proxy. The mailbox servers must have their backend ports enabled and the proxy lookup target set, which is part of the multi server setup. The same checks help when services show red in the admin console, see Zimbra some services are not running.
Mistakes to avoid when you install Zimbra proxy
- Selecting too many packages. When you install Zimbra proxy and leave ldap, store or mta at
Y, you install a full server, not only the proxy. - Weak example passwords. Do not use a simple password for the LDAP admin or the Nginx user; use the generated value or a long one.
- Port conflicts. The guide says to turn off other services on the proxy ports (80, 443, 110, 995, 143, 993). The installer checks for port conflicts before the menu.
- Wrong installer version. If you install Zimbra proxy from another release, it may not work with the other servers. The proxy must use the same Zimbra release as the rest of the environment.
FAQ
Do I have to install Zimbra proxy on its own server?
No. The Administrator Guide says that you can install it on a mailbox server, an MTA server or an independent server. A separate server is the clean choice for load balancing and SSL termination.
How is a proxy different from the mailbox server when I install Zimbra proxy?
The proxy only routes: Nginx asks the Route Lookup Handler where the account lives and Memcached keeps the answer for one hour by default; the mail stays on the mailbox servers. For account work on those servers see how to check Zimbra account status.
How do I undo it after I install Zimbra proxy?
Use the installer in uninstall mode, as shown in the guide to uninstall Zimbra.
References
- Zimbra Collaboration Administrator Guide (Zimbra Proxy, proxy ports)
- Zimbra documentation
To install Zimbra proxy: choose only zimbra-proxy and zimbra-memcached, set the LDAP master host and password, check the ports and apply the configuration.
ldap-m01.huuphan.local? where do get it ? I'm confused!
ReplyDelete192.168.131.10 ns1.huuphan.local ns1
192.168.131.11 ldap.huuphan.local ldap
192.168.131.12 mta.huuphan.local mta
192.168.131.13 mailbox.huuphan.local mailbox
192.168.131.14 proxy.huuphan.local proxy