在CentOS 8上安装Zimbra Mail Server | RHEL 8

这是续集。
您可以通过以下链接以PDF格式下载本文,以为我们提供支持。

以PDF格式下载指南


这是续集。

这是续集。
这是续集。

设立邮件服务器是创业的关键要求之一。这意味着将您的电子邮件解决方案与SaaS产品一起使用,或在您自己的基础架构上部署完整的电子邮件解决方案。 Zimbra是一种流行的开源电子邮件解决方案,专为小型到大型企业而设计。有您想要的商业报价 附加功能..本教程描述了如何在CentOS 8和RHEL 8 Linux服务器上安装Zimbra Mail Server。

Zimbra Mail and Collaboration Server的主要组件是:

  • Zimbra核心答:这些是基本库,实用程序,监视工具和基本配置文件。
  • Zimbra LDAP:它具有一个OpenLDAP LDAP目录服务器,该服务器为用户和其他zimbra组件提供身份验证和配置存储。
  • Zimbra MTA(邮件路由服务器):有一个Postfix邮件传输代理(MTA)通过SMTP接收电子邮件,并使用本地邮件传输协议(LMTP)将每封邮件路由到适当的Zimbra邮箱服务器。它还包括防病毒和反垃圾邮件组件。
  • Zimbra商店(Zimbra服务器):邮箱服务器包含服务器上邮箱的数据存储,消息存储和索引存储。邮件到达时,Zimbra服务器会安排一个线程在索引存储中为邮件建立索引。
  • Zimbra SNMP:这是用于监视的可选组件,并在所有服务器(Zimbra服务器,Zimbra LDAP,Zimbra MTA)上运行。 Swatch用于监视系统日志输出并生成SNMP陷阱。
  • Zimbra记录器:这是邮箱服务器的可选组件。它安装了用于系统日志聚合,报告和消息跟踪的工具。这是邮件跟踪功能所必需的。

请参阅下面的系统架构,以了解所有组件如何协同工作以提供协作套件。

在CentOS 8上安装Zimbra Mail Server | RHEL 8

在撰写本文时,最新版本的Zimbra Collaboration Suite是一个版本 9 但是,它尚不适用于开源产品。这是您将在CentOS 8上安装的Zimbra邮件服务器。 RHEL 8服务器。要在CentOS 8 / RHEL 8 Linux系统上安装和配置Zimbra Mail Server,请执行以下步骤:

此安装的最低系统要求是:

  • 记忆:> = 8GB
  • vcpus:> = 4
  • 磁碟:/ Opt> 10GB –推荐 / opt / zimbra 作为另一个分区。
  • 邮件域:配置了MX DNS条目的FQDN,例如 mail.computingforgeeks.com
  • 域名解析 MX记录

这是我在服务器上拥有的:

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       169Mi        14Gi        16Mi       206Mi        14Gi
Swap:            0B          0B          0B

$ df -hT /opt
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sda1      ext4  151G 1020M  143G   1% /

步骤1:更新系统,安装依赖项并配置NTP

我们始终确保我们的系统已更新到最新的可用OS版本。

sudo dnf -y update

安装一些基本的依赖项。

sudo dnf -y install epel-release dnf-utils
sudo dnf config-manager --enable PowerTools
sudo dnf -y install bash-completion vim curl wget unzip openssh-clients telnet net-tools sysstat perl-core libaio nmap-ncat libstdc++.so.6 bind-utils tar

设置与邮件服务器的DNS名称匹配的服务器主机名。

sudo hostnamectl set-hostname mail.computingforgeeks.com --static

另外,配置正确的时区和NTP。

sudo dnf -y install chrony
sudo timedatectl set-timezone Africa/Nairobi
sudo systemctl enable --now chronyd
sudo chronyc sources

确保时间设置正确。

$ timedatectl
               Local time: Sun 2020-07-05 14:47:26 EAT
           Universal time: Sun 2020-07-05 11:47:26 UTC
                 RTC time: Sun 2020-07-05 11:47:25
                Time zone: Africa/Nairobi (EAT, +0300)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

执行系统重新引导,以确保升级后可以重新引导服务器。

sudo systemctl reboot

步骤2:配置DNS条目

您需要设置两个DNS记录。

  1. 邮件服务器A记录
  2. MX记录

这些是我在Zimbra服务器上设置的值

mail.computingforgeeks.com A 95.217.220.167
computingforgeeks.com MX mail.computingforgeeks.com
mail.computingforgeeks.com MX mail.computingforgeeks.com

我的DNS提供商是Cloudflare。请与您的DNS提供商联系,以获取有关如何配置A和MX记录的说明。

记录设置:

在CentOS 8上安装Zimbra Mail Server | RHEL 8

设置主域的MX记录。

在CentOS 8上安装Zimbra Mail Server | RHEL 8

还要设置邮件服务器的MX记录。

在CentOS 8上安装Zimbra Mail Server | RHEL 8

在Zimbra服务器命令行上应用和验证设置可能需要几分钟的时间。

$ dig A mail.computingforgeeks.com +short
95.217.220.155

$ dig MX computingforgeeks.com +short
0 mail.computingforgeeks.com.

$ dig MX mail.computingforgeeks.com +short
0 mail.computingforgeeks.com.

步骤3:下载Zimbra协作软件

Zimbra协作套件有两个版本。

在本指南中,我们将在CentOS 8 | RHEL 8 Linux服务器上安装Zimbra的开源版本。

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

提取文件:

tar xvf zcs-8.8.15_GA_3953.RHEL8_64.20200629025823.tgz

步骤4:在CentOS 8 | RHEL 8上安装Zimbra Collaboration Suite

将服务器IP和DNS名称添加到/ etc / hosts文件中。

$ sudo vim /etc/hosts
95.217.220.155 mail.computingforgeeks.com

确保正确设置了您的语言环境- 我们 英文和UTF-8:

sudo localectl set-locale LANG=en_US.UTF-8
sudo localectl set-locale LANGUAGE=en_US
echo "export LC_ALL=en_US.UTF-8" >>~/.bashrc
logout

重新登录到Zimbra服务器,并cd到包含ZCS存档tar文件的目录。

cd zcs-8.8.15_GA_3953.RHEL8_64.20200629025823

在目录中,您将看到:

  • README.txt –自述文件
  • install.sh –安装脚本
  • 地点/ –安装期间使用的二进制文件
  • 数据/ –包含安装数据
  • 包/ –包括ZCS RPM
  • docs / –其他文件

运行以开始安装 install.sh 剧本。

sudo ./install.sh

1. ÿ接受许可条款并开始安装。

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

2. 我同意使用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)

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

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

Zimbra软件包的下载和安装将开始。

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
      ...done

Installing local packages (26):
   zimbra-common-core-jar
   zimbra-common-core-libs
   zimbra-common-mbox-conf
   zimbra-common-mbox-conf-attrs
   zimbra-common-mbox-conf-msgs
   zimbra-common-mbox-conf-rights
   zimbra-common-mbox-db
   zimbra-common-mbox-docs
   zimbra-common-mbox-native-lib
   zimbra-timezone-data
   zimbra-core
   zimbra-ldap
   zimbra-logger
   zimbra-mta
   zimbra-dnscache
   zimbra-snmp
   zimbra-mbox-admin-console-war
   zimbra-mbox-conf
   zimbra-mbox-war
   zimbra-mbox-service
   zimbra-mbox-store-libs
   zimbra-mbox-webclient-war
   zimbra-store
   zimbra-apache
   zimbra-spell
   zimbra-proxy
      ...done

Installing extra packages (5):
   zimbra-drive
   zimbra-patch
   zimbra-mta-patch
   zimbra-proxy-patch
   zimbra-chat
      ...done

Running Post Installation Configuration:
Operations logged to /tmp/zmsetup.20200705-161319.log
Installing LDAP configuration database...done.
Setting defaults...

发生DNS错误时,将邮件域设置为添加DNS条目的主域。

...
DNS ERROR resolving MX for mail.computingforgeeks.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes]
Create domain: [mail.computingforgeeks.com] computingforgeeks.com
	MX: mail.computingforgeeks.com (95.217.220.155)

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

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

   8) zimbra-spell:                            Enabled
   9) zimbra-proxy:                            Enabled
  10) Default Class of Service Configuration:
   s) Save config to file
   x) Expand menu
   q) Quit

Address unconfigured (**) items  (? - help) 7


.....
Store configuration

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

Select, or 'r' for previous menu [r] 4
Password for [email protected] (min 6 characters): [8IFLmFH7Wr] 

返回上一个菜单, 一个 开始安装的密钥。

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
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.9721]
Saving config in /opt/zimbra/config.9721...done.
The system will be modified - continue? [No] yes

安装程序脚本将开始在CentOS 8上配置Zimbra邮件服务器。 RHEL8。如果安装成功,您将看到类似于以下的输出。

Operations logged to /tmp/zmsetup.20200705-161319.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.computingforgeeks.com...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.computingforgeeks.com...done.
Setting zimbraFeatureTasksEnabled=TRUE...done.
Setting zimbraFeatureBriefcasesEnabled=TRUE...done.
Checking current setting of zimbraReverseProxyAvailableLookupTargets
Querying LDAP for other mailstores
Searching LDAP for reverseProxyLookupTargets...done.
Adding mail.computingforgeeks.com to zimbraReverseProxyAvailableLookupTargets
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.
Updating zimbraLDAPSchemaVersion to version '1571057268'
Setting TimeZone Preference...done.
Disabling strict server name enforcement on mail.computingforgeeks.com...done.
Initializing mta config...done.
Setting services on mail.computingforgeeks.com...done.
Adding mail.computingforgeeks.com to zimbraMailHostPool in default COS...done.
Creating domain computingforgeeks.com...done.
Setting default domain name...done.
Creating domain computingforgeeks.com...already exists.
Creating admin account [email protected]
Creating root alias...done.
Creating postmaster alias...done.
Creating user [email protected]
Creating user [email protected]
Creating user [email protected]
Setting spam training and Anti-virus quarantine accounts...done.
Initializing store sql database...done.
Setting zimbraSmtpHostname for mail.computingforgeeks.com...done.
Configuring SNMP...done.
Setting up syslog.conf...done.
Starting servers...done.
Installing common zimlets...
	com_zimbra_ymemoticons...done.
	com_zimbra_attachcontacts...done.
	com_zimbra_clientuploader...done.
	com_zimbra_proxy_config...done.
	com_zimbra_mailarchive...done.
	com_zimbra_phone...done.
	com_zimbra_attachmail...done.
	com_zextras_chat_open...done.
	com_zimbra_webex...done.
	com_zextras_drive_open...done.
	com_zimbra_url...done.
	com_zimbra_adminversioncheck...done.
	com_zimbra_srchhighlighter...done.
	com_zimbra_bulkprovision...done.
	com_zimbra_date...done.
	com_zimbra_viewmail...done.
	com_zimbra_tooltip...done.
	com_zimbra_email...done.
	com_zimbra_cert_manager...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.15_GA_3953_RHEL8_64)
	The ADMIN EMAIL ADDRESS created ([email protected])

Notify Zimbra of your installation? [Yes]
Notify Zimbra of your installation? [Yes]
Notifying Zimbra of installation via http://www.zimbra.com/cgi-bin/notify.cgi?VER=8.8.15_GA_3953_RHEL8_64&[email protected]

Notification complete

Checking if the NG started running...done.
Setting up zimbra crontab...done.


Moving /tmp/zmsetup.20200705-161319.log to /opt/zimbra/log


Configuration complete - press return to exit

检查Zimbra服务的状态。

$ sudo su - zimbra -c "zmcontrol status"
Host mail.computingforgeeks.com
	amavis                  Running
	antispam                Running
	antivirus               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                   Running
	zimbra webapp           Running
	zimbraAdmin webapp      Running
	zimlet webapp           Running
	zmconfigd               Running

步骤5:配置SSL证书

我们建议您使用由认证的CA签名的SSL证书或免费的Let’s Encrypt证书。请参阅下面的指南进行安装。

使用“加密SSL”证书保护Zimbra服务器

步骤6:访问Zimbra管理控制台

如果您有活动的防火墙,请查看有关如何打开端口的指南。

使用Ufw和Firewalld的Zimbra防火墙配置

在CentOS 8上安装Zimbra | RHEL 8完成后,让我们打开管理控制台https:// ip-addres |主机名:7071

在CentOS 8上安装Zimbra Mail Server | RHEL 8

用用户名登录 管理员 您之前设置的密码。

在CentOS 8上安装Zimbra Mail Server | RHEL 8

所有Zimbra服务监控“ 部分。

在CentOS 8上安装Zimbra Mail Server | RHEL 8

其他Zimbra指南:

如何从备份还原Zimbra LDAP数据库

如何为Zimbra设置Microsoft Outlook

如何在Zimbra上设置安全密码策略

这是续集。
您可以通过以下链接以PDF格式下载本文,以为我们提供支持。

以PDF格式下载指南


这是续集。

这是续集。
这是续集。

Sidebar