网站搜索

在 RHEL/CentOS 7/8 上设置 Zimbra 协作套件 (ZCS)


Zimbra 协作套件 (ZCS) 是一个用于电子邮件服务器的开源协作平台,开发有两个版本,开源版本 (免费)和网络版付费),提供 LDAP、SMTP、POP 和 IMAP、网络邮件客户端、日历、任务、防病毒、反垃圾邮件等服务和别的。

本教程介绍如何在 CentOS/RHEL 7 服务器上安装 Zimbra Collaboration Suite 开源版

要求

  • 具有 AMX 有效记录的外部 DNS 服务器,指向您的 Zimbra 邮件服务器 IP 地址。
  • CentOS 8/RHEL 8 或 CentOS 7/RHEL 7 的全新最小安装,无需启动和运行任何邮件、数据库、LDAP、DNS 或 Http 服务器。
  • 分配给网络接口的静态 IP 地址。

第1步:安装系统包

1. 在我们继续 Zimbra Collaboration Suite 安装过程之前,首先使用 root 权限登录到您的服务器控制台并安装以下软件包:

yum -y install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6

2. 接下来,发出 getenforce 命令来检查您的计算机上是否启用了 Selinux。如果策略设置为强制,请通过发出以下命令禁用它:

getenforce
setenforce 0
getenforce

要在 CentOS 上完全禁用 Selinux,请使用文本编辑器打开 /etc/selinux/config 文件并将 SELINUX 行设置为 disabled

3. 通过发出以下命令,确保您的系统上也安装了 wget 系统实用程序:

yum install wget 

第 2 步:配置系统主机名

4. 为了使 Zimbra 正常运行,您必须通过运行以下命令将本地计算机主机名和 FQDN 设置为指向您的服务器 IP 地址来自 root 帐户的 hostnamectl 命令:

hostnamectl set-hostname mail
echo "192.168.0.14  mail.centos7.lan  mail " >> /etc/hosts
cat /etc/hosts

相应地替换系统主机名和 FQDN 值,以匹配您自己的域设置。通过对两条记录发出 ping 命令来测试主机名和 FQDN 值。

ping -c1 mail.centos7.lan
ping -c1 mail

步骤 3:添加静态 IP 地址

5.如果您的服务器使用 DHCP 动态 IP 地址,则您需要编辑网络接口卡并配置为使用静态 IP 地址。使用 ip addr 命令获取网络接口信息并识别您的服务器外部 NIC(通常类似于 enp0s3eth0)。

ip addr

然后,针对需要更改设置的接口运行 nmtui-edit 命令并为该接口分配手动 IP 地址。使用下面的屏幕截图作为指导。

nmtui-edit enp0s3

步骤 4:禁用不需要的服务

6. CentOS 默认安装附带已安装并运行的 postfix 守护进程。要禁用并删除 postfix 服务,请运行以下命令:

systemctl stop postfix
systemctl disable postfix
yum remove postfix

删除服务后,发出 ss 命令以检查系统上是否正在运行与 Zimbra 服务不兼容的其他守护进程,例如 LDAP、httpd、dovecot。如果是这种情况,也将它们删除。

第 5 步:安装 Zimbra Collaboration Suite 开源版

7.现在是时候安装Zimbra Collaboration Suite了。转至 Zimbra Collaboration Suite 下载页面,并通过发出以下 wget 命令获取系统上的最新版本:

----------------- For RHEL/CentOS 8 -----------------
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3953.RHEL8_64.20200629025823.tgz

----------------- For RHEL/CentOS 7 -----------------
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz

----------------- For RHEL/CentOS 6 -----------------
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.RHEL6_64.20190918004220.tgz

8.下载完成后,使用unzip命令解压压缩包,进入Zimbra解压目录并列出目录内容以找到安装程序文件。

tar xfz zcs-8.8.15_GA_3953.RHEL8_64.20200629025823.tgz
cd zcs-8.8.15_GA_3953.RHEL8_64.20200629025823/
ls

9. 现在,通过启动执行名为 install.sh 的安装程序脚本文件来启动 Zimbra 安装过程。

经过一系列系统检查后,安装程序将提示您接受许可证。同意许可证(y)才能继续安装过程。

./install.sh
OR
./install.sh --platform-override   [On different platforms other than RHEL]
样本输出
Operations logged to /tmp/install.log.92OcKO6s
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

10.接下来,安装过程将提示您一系列问题,以便正确配置 Zimbra 守护程序。使用以下安装摘录来进一步设置 Zimbra 服务。

Use Zimbra's package repository [Y] y

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] y

11.接下来,它会要求您安装Zimbra软件包,按Y安装全部。

Select the packages to install

Install zimbra-ldap [Y] y Install zimbra-logger [Y] y Install zimbra-mta [Y] y Install zimbra-dnscache [Y] y Install zimbra-snmp [Y] y Install zimbra-store [Y] y Install zimbra-apache [Y] y Install zimbra-spell [Y] y Install zimbra-memcached [Y] y Install zimbra-proxy [Y] 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-imapd zimbra-patch zimbra-mta-patch zimbra-proxy-patch zimbra-chat

12.最后,它将启动 Zimbra 安装过程。

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

Beginning Installation - see /tmp/install.log.92OcKO6s for details...

                          zimbra-core-components will be downloaded and installed.
                          zimbra-common-core-jar will be installed.
                         zimbra-common-core-libs will be installed.
                         zimbra-common-mbox-conf will be installed.
                   zimbra-common-mbox-conf-attrs will be installed.
                    zimbra-common-mbox-conf-msgs will be installed.
                  zimbra-common-mbox-conf-rights will be installed.
                           zimbra-common-mbox-db will be installed.
                         zimbra-common-mbox-docs will be installed.
                   zimbra-common-mbox-native-lib will be installed.
                            zimbra-timezone-data will be installed.
                                     zimbra-core will be installed.
                          zimbra-ldap-components will be downloaded and installed.
                                     zimbra-ldap will be installed.
                                   zimbra-logger will be installed.
                           zimbra-mta-components will be downloaded and installed.
                                      zimbra-mta will be installed.
                      zimbra-dnscache-components will be downloaded and installed.
                                 zimbra-dnscache will be installed.
                          zimbra-snmp-components will be downloaded and installed.
                                     zimbra-snmp will be installed.
Last metadata expiration check: 0:00:56 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                       zimbra-jetty-distribution will be downloaded and installed.
                         zimbra-store-components will be downloaded and installed.
                   zimbra-mbox-admin-console-war will be installed.
                                zimbra-mbox-conf will be installed.
                                 zimbra-mbox-war will be installed.
                             zimbra-mbox-service will be installed.
                          zimbra-mbox-store-libs will be installed.
                       zimbra-mbox-webclient-war will be installed.
                                    zimbra-store will be installed.
                        zimbra-apache-components will be downloaded and installed.
                                   zimbra-apache will be installed.
                         zimbra-spell-components will be downloaded and installed.
                                    zimbra-spell will be installed.
Last metadata expiration check: 0:01:07 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                zimbra-memcached will be downloaded and installed.
                         zimbra-proxy-components will be downloaded and installed.
                                    zimbra-proxy will be installed.
Last metadata expiration check: 0:01:18 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                    zimbra-drive will be downloaded and installed (later).
                                    zimbra-imapd will be installed.
Last metadata expiration check: 0:01:20 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                    zimbra-patch will be downloaded and installed (later).
Last metadata expiration check: 0:01:22 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                zimbra-mta-patch will be downloaded and installed (later).
Last metadata expiration check: 0:01:23 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                              zimbra-proxy-patch will be downloaded and installed (later).
Last metadata expiration check: 0:01:27 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                     zimbra-chat will be downloaded and installed (later).

Downloading packages (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-dnscache-components
   zimbra-snmp-components
   zimbra-jetty-distribution
   zimbra-store-components
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
      ...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 (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-dnscache-components
   zimbra-snmp-components
   zimbra-jetty-distribution
   zimbra-store-components
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
      ...

13.商店配置。

1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    [email 
** 4) Admin Password                           UNSET
   5) Anti-virus quarantine user:              [email 
   6) Enable automated spam training:          yes
   7) Spam training user:                      [email 
   8) Non-spam(Ham) training user:             [email 
   9) SMTP host:                               mail.centos7.lan
  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://mail.centos7.lan:7780/aspell.php
  19) Enable version update checks:            TRUE
  20) Enable version update notifications:     TRUE
  21) Version update notification email:       [email 
  22) Version update source email:             [email 
  23) Install mailstore (service webapp):      yes
  24) Install UI (zimbra,zimbraAdmin webapps): yes

Select, or 'r' for previous menu [r] 4 # Select 4 to set admin password Password for [email  (min 6 characters): [54mE0RmqN] enter admin password here
Store configuration

   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    [email 
   4) Admin Password                           set
   5) Anti-virus quarantine user:              [email 
   6) Enable automated spam training:          yes
   7) Spam training user:                      [email 
   8) Non-spam(Ham) training user:             [email 
   9) SMTP host:                               mail.centos7.lan
  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://mail.centos7.lan:7780/aspell.php
  19) Enable version update checks:            TRUE
  20) Enable version update notifications:     TRUE
  21) Version update notification email:       [email 
  22) Version update source email:             [email 
  23) Install mailstore (service webapp):      yes
  24) Install UI (zimbra,zimbraAdmin webapps): yes

Select, or 'r' for previous menu [r] r
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  # Apply configuration Save configuration data to a file? [Yes] Enter Save config in file: [/opt/zimbra/config.11047] Saving config in /opt/zimbra/config.11047...done. The system will be modified - continue? [No] yes Operations logged to /tmp/zmsetup01262016-002704.log Setting local config values...done. Initializing core config...Setting up CA...done. Deploying CA to /opt/zimbra/conf/ca ...done. Creating SSL zimbra-store certificate...done. Creating new zimbra-ldap SSL certificate...done. Creating new zimbra-mta SSL certificate...done. Creating new zimbra-proxy SSL certificate...done. Installing mailboxd SSL certificates...done. Installing MTA SSL certificates...done. Installing LDAP SSL certificate...done. Installing Proxy SSL certificate...done. Initializing ldap...done. Setting replication password...done. Setting Postfix password...done. Setting amavis password...done. Setting nginx password...done. Setting BES searcher password...done. Creating server entry for mail.centos7.lan...done. Setting Zimbra IP Mode...done. Saving CA in ldap ...done. Saving SSL Certificate in ldap ...done. Setting spell check URL...done. Setting service ports on mail.centos7.lan...done. Setting zimbraFeatureTasksEnabled=TRUE...done. Setting zimbraFeatureBriefcasesEnabled=TRUE...done. Setting Master DNS IP address(es)...done. Setting DNS cache tcp lookup preference...done. Setting DNS cache udp lookup preference...done. Setting DNS tcp upstream preference...done. Setting TimeZone Preference...done. Initializing mta config...done. Setting services on mail.centos7.lan...done. Adding mail.centos7.lan to zimbraMailHostPool in default COS...done. Creating domain mail.centos7.lan...done. Setting default domain name...done. Creating domain mail.centos7.lan...already exists. Creating admin account [email . Creating root alias...done. Creating postmaster alias...done. Creating user [email . Creating user [email . Creating user [email . Setting spam training and Anti-virus quarantine accounts...done. Initializing store sql database...done. Setting zimbraSmtpHostname for mail.centos7.lan...done. Configuring SNMP...done. Setting up syslog.conf...done. Starting servers...done. Installing common zimlets... com_zimbra_adminversioncheck...done. com_zimbra_attachcontacts...done. com_zimbra_attachmail...done. com_zimbra_bulkprovision...done. com_zimbra_cert_manager...done. com_zimbra_clientuploader...done. com_zimbra_date...done. com_zimbra_email...done. com_zimbra_mailarchive...done. com_zimbra_phone...done. com_zimbra_proxy_config...done. com_zimbra_srchhighlighter...done. com_zimbra_tooltip...done. com_zimbra_url...done. com_zimbra_viewmail...done. com_zimbra_webex...done. com_zimbra_ymemoticons...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.6.0_GA_1153_RHEL7_64) The ADMIN EMAIL ADDRESS created ([email ) Notify Zimbra of your installation? [Yes] no Notification skipped Setting up zimbra crontab...done. Moving /tmp/zmsetup01262016-002704.log to /opt/zimbra/log Configuration complete - press return to exit # Press Enter

第 6 步:Zimba 初始配置

14.安装完成后,打开网络浏览器并通过 HTTPS 协议在端口 7071 上导航到运行 Zimbra 服务的计算机的域名或 IP 地址,接受证书安全错误,并使用安装过程中配置的凭据登录。 Zimbra 管理 Web 面板的默认用户名是 admin

https://mail.centos7.lan:7071
or
https://192.168.1.14:7071 

15.登录管理 Web 控制台后,您可以开始添加自己的 SSL 证书、创建邮件帐户、邮件别名等。请记住,端口 7071 仅用于管理任务。

客户可以通过HTTPS协议使用域名或服务器IP地址安全地登录自己的网络邮箱。

https://mail.centos7.lan 
or
https://192.168.1.14 

恭喜!现在您已经在您的场所安装了完整的运行邮件堆栈。

第 6 步:删除或卸载 Zimbra

如果您希望卸载 Zimbra 服务及其组件,请运行带有 -u 选项的安装程序脚本。

./install.sh -u

要删除 Zimbra 安装存档和目录,请运行以下命令:

cd
rm -rf zcs-*

最后要注意的是,为了正确运行 Zimbra Collaboration Suite,您需要一台功能强大的计算机,至少需要 4GB RAM。


版权所有。 © Linux-Console.net • 2019-2024