如何在Ubuntu 18.04 LTS上安装Zimbra Collaboration

时间:2020-02-23 14:44:45  来源:igfitidea点击:

在这篇文章中,我将在Ubuntu 18.04 LTS服务器上安装最新的Zimbra Collaboration 8.8.x Community Edition版本。
这些步骤仅适用于单服务器安装,对于Zimbra Collaboration的多服务器安装,请参阅CentOS 7上的引导Zimbra Multi-Server安装

在Ubuntu 18.04 LTS上安装Zimbra Collaboration Suite - 准备工作

要使用本教程,我们应该:已安装Ubuntu 18.04 serverhave ssh访问用户 - 使用sudo privilegeshave DNS服务器 - DNSMASQ应该是好的

支持最多50个用户的Zimbra Server的推荐系统要求是:

4 VCPU或者更多,具体取决于可用资源8 GB RAM或者Meture50 GB可用的磁盘Spacedns服务器

按照以下步骤在Ubuntu 18.04服务器上安装和配置Zimbra Collaboration Server。

第1步:安装和配置DNSMASQ

在本教程中,我们将使用DNSMASQ作为DNS服务器。
遵循本教程如何在Ubuntu 18.04 LTS上安装和配置DNSMASQ。

设置Zimbra Domain,DNS服务器转发器和MX记录。

$sudo vim /etc/dnsmasq.conf
server=8.8.8.8
listen-address=127.0.0.1
domain=example.com   # Define domain
mx-host=example.com,mail.example.com,0  # Set MX record for the domain, preference is 0
address=/mail.example.com/62.15.116.167 # Send example.com to 62.15.116.167

设置服务器主机名:

sudo hostnamectl set-hostname mail.example.com

添加服务器名称和IP地址 /etc/hosts文件。

echo "62.15.116.167 mail.example.com" | sudo tee -a /etc/hosts

重新开始 dnsmasq服务和测试。

sudo systemctl restart dnsmasq

挖掘Zimbra服务器的记录。

$dig A zimbra.theitroad.com
 ; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> A zimbra.theitroad.com @127.0.0.1
 ;; global options: +cmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14888
 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
 ;; OPT PSEUDOSECTION:
 ; EDNS: version: 0, flags:; udp: 4096
 ;; QUESTION SECTION:
 ;zimbra.theitroad.com.    IN  A
 ;; ANSWER SECTION:
 zimbra.theitroad.com. 0    IN  A   62.15.116.167
 ;; Query time: 0 msec
 ;; SERVER: 127.0.0.1#53(127.0.0.1)
 ;; WHEN: Mon Apr 01 21:58:39 CEST 2019
 ;; MSG SIZE  rcvd: 73

此外,查询域的MX记录。
应该返回Zimbra Server IP地址。

$dig MX theitroad.com
 ; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> MX zimbra.theitroad.com @127.0.0.1
 ;; global options: +cmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25343
 ;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2
 ;; OPT PSEUDOSECTION:
 ; EDNS: version: 0, flags:; udp: 4096
 ;; QUESTION SECTION:
 ;zimbra.theitroad.com.    IN  MX
 ;; ANSWER SECTION:
 zimbra.theitroad.com. 0    IN  MX  0 zimbra.theitroad.com.
 ;; ADDITIONAL SECTION:
 zimbra.theitroad.com. 0    IN  A   62.15.116.167
 ;; SERVER: 127.0.0.1#53(127.0.0.1)
 ;; WHEN: Mon Apr 01 21:59:40 CEST 2019
 ;; MSG SIZE  rcvd: 117

现在我们有一个记录和mx,让我们开始安装。

第2步:下载Zimbra Collaboration Open Source Edition

截至本文,Zimbra的最新发布为8.8.15.
让我们将文件下载到本地服务器。

wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz

提取文件:

tar xvf zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz

更改为ZCS- *目录,

cd zcs*/

第3步:在Ubuntu 18.04 LTS上安装Zimbra Collaboration

我们已准备好开始在Ubuntu 18.04 LTS上安装Zimbra Collaboration Open Source Edition。

运行安装程序脚本 - 这是一个服务器安装中的全部。

# sudo ./install.sh
Operations logged to /tmp/install.log.DM7y8xw8
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
---------------------------------------------------------------------

1.执行"y"以接受许可条款并开始安装。

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

2.同意使用Zimbra包存储库。

Use Zimbra's package repository [Y] 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)

3.选择要安装的包

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-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.
Installing:
    zimbra-core
    zimbra-ldap
    zimbra-logger
    zimbra-mta
    zimbra-dnscache
    zimbra-snmp
    zimbra-store
    zimbra-apache
    zimbra-spell
    zimbra-memcached
    zimbra-proxy
    zimbra-drive
    zimbra-patch
    zimbra-mta-patch
    zimbra-proxy-patch
    zimbra-chat

4.同意系统修改。

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

下载和安装Zimbra软件包将启动。

Downloading packages (12):
   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
   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 (12):
   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
   zimbra-mta-patch
      ...

设置管理员帐户密码 - 7> 4

7) zimbra-store:                            Enabled                       
        +Create Admin User:                    yes                           
        +Admin user to create:                 Hyman@theitroad
** ***** +Admin Password                        UNSET                         
        +Anti-virus quarantine user:           Hyman@theitroad
        +Enable automated spam training:       yes                           
        +Spam training user:                   Hyman@theitroad
        +Non-spam(Ham) training user:          Hyman@theitroad
        +SMTP host:                            zimbra.theitroad.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:                     //zimbra.theitroad.com:7780/aspell.php
        +Enable version update checks:         TRUE                          
        +Enable version update notifications:  TRUE                          
        +Version update notification email:    Hyman@theitroad
        +Version update source email:          Hyman@theitroad
        +Install mailstore (service webapp):   yes                           
        +Install UI (zimbra,zimbraAdmin webapps): yes 
.....
Password for Hyman@theitroad (min 6 characters): [8441mra12P]

完整配置并应用。

Main menu
 1) Common Configuration:                                                  
    2) zimbra-ldap:                             Enabled                       
    3) zimbra-logger:                           Enabled                       
    4) zimbra-mta:                              Enabled                       
    5) zimbra-dnscache:                         Enabled                       
    6) zimbra-snmp:                             Enabled                       
    7) zimbra-store:                            Enabled                       
    8) zimbra-spell:                            Enabled                       
    9) zimbra-proxy:                            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] <Enter>  
 Save config in file: [/opt/zimbra/config.24171] 
 Saving config in /opt/zimbra/config.24171…done.
 The system will be modified - continue? [No] Yes

安装程序脚本将开始配置Zimbra Server。
完成后,我们应该如下所示的输出。

Starting servers...done.
Installing common zimlets...
	com_zimbra_cert_manager...done.
	com_zimbra_adminversioncheck...done.
	com_zimbra_attachcontacts...done.
	com_zimbra_viewmail...done.
	com_zimbra_attachmail...done.
	com_zimbra_url...done.
	com_zimbra_webex...done.
	com_zimbra_bulkprovision...done.
	com_zimbra_proxy_config...done.
	com_zimbra_mailarchive...done.
	com_zextras_chat_open...done.
	com_zimbra_ymemoticons...done.
	com_zimbra_clientuploader...done.
	com_zimbra_date...done.
	com_zimbra_srchhighlighter...done.
	com_zimbra_tooltip...done.
	com_zextras_drive_open...done.
	com_zimbra_phone...done.
	com_zimbra_email...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_UBUNTU18_64)
	The ADMIN EMAIL ADDRESS created (Hyman@theitroad)
Notify Zimbra of your installation? [Yes]
Checking if the NG started running...done. 
Setting up zimbra crontab...done.
Moving /tmp/zmsetup.20190401-221739.log to /opt/zimbra/log
Configuration complete - press return to exit

确认Zimbra服务状态。

# su - zimbra -c "zmcontrol status"
Host zimbra.theitroad.com
     amavis                  Running
     antispam                Running
     dnscache                Running
     ldap                    Running
     logger                  Running
     mailbox                 Running
     memcached               Running
     mta                     Running
     opendkim                Running
     proxy                   Running
     service webapp          Running
     snmp                    Running
     spell                   Running
     stats                   Stopped
     zimbra webapp           Running
     zimbraAdmin webapp      Running
     zimlet webapp           Running
     zmconfigd               Running

访问Zimbra Admin Dashboard

如果我们有一个活动防火墙,请使用Zimbra防火墙配置为Zimbra配置为UFW for Ubuntu和Firewalld for CentOS

访问管理员接口使用 https://ip-addres|hostname:7071

使用前面配置的用户名管理员和密码登录。