在CentOS 8 | rhel 8上安装Zimbra Mail Server
Zimbra是一款受欢迎的开源邮件解决方案,专为小型企业而设计。
有一种商业产品,我们可以想要额外的功能。
在本教程中,我们将讨论如何在CentOS 8和RHEL 8 Linux服务器上安装配置Zimbra Mail Server。
Zimbra Mail和Collaboration Server的主要组成部分是:Zimbra Core:这些是基本的库,实用程序,监控工具和基本配置文件.zimbra LDAP:这具有OpenLDAP LDAP目录服务器,为用户和其他Zimbra提供身份验证和配置存储Components.zimbra MTA(邮件路由服务器):具有通过SMTP接收电子邮件的Postfix邮件传输代理(MTA),并使用本地邮件传输协议(LMTP)将每个消息路由到适当的Zimbra邮箱服务器。
它还包括防我将毒和反垃圾邮件组件.Zimbra Store(Zimbra Server):邮箱服务器包括服务器上邮箱的数据存储,消息存储和索引存储。
当邮件到达时,Zimbra Server计划一个线程在索引Store.zimbra-snmp中将索引索引:这是用于监控的可选组件,它在每个服务器上运行(Zimbra Server,Zimbra LDAP,Zimbra MTA)。
Swatch用于观看Syslog输出以生成SNMP Traps.zimbra Logger:这是邮箱服务器的可选组件。
它为Syslog聚合,报告和消息跟踪安装工具。
消息跟踪功能需要这一点。
请参阅下面的系统架构,了解所有组件如何运行,以提供协作套件。
在CentOS 8 | rhel 8上安装Zimbra Mail Server
撰写本文的文章,最新的Zimbra Collaboration Suite Release是版本9,但尚未提供开源提供。
这是Zimbra Mail Server我们将在CentOS 8中安装| RHEL 8服务器。
按照以下步骤在CentOS 8/Rhel 8 Linux系统上安装和配置Zimbra Mail Server。
此安装的最低系统要求是:内存:> = 8GBVCPU:> = 4disk:/Opt> 10GB - 建议将/opt/Zimbra作为单独的隔板..对于MX配置的DNS条目,例如MAX的FQDN。
onitoad.comdns为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
我们始终确保系统更新到最新的可用操作系统版本。
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
设置服务器主机名以匹配Mail Server DNS名称:
sudo hostnamectl set-hostname mail.theitroad.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 2017-07-05 14:47:26 EAT Universal time: Sun 2017-07-05 11:47:26 UTC RTC time: Sun 2017-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记录.AN邮件serveran mx记录的记录
这些是我将为我的Zimbra服务器设置的值
mail.theitroad.com A 95.217.220.167 theitroad.com MX mail.theitroad.com mail.theitroad.com MX mail.theitroad.com
我的DNS提供商是CloudFlare。
请咨询DNS提供商如何配置A和MX记录。
设置记录:
为主域设置MX记录。
还为邮件服务器设置MX记录。
仅需几分钟才能传播,然后验证Zimbra Server命令行上的设置。
$dig A mail.theitroad.com +short 95.217.220.155 $dig MX theitroad.com +short 0 mail.theitroad.com. $dig MX mail.theitroad.com +short 0 mail.theitroad.com.
第3步:下载Zimbra Collaboration软件
Zimbra Collaboration Suite有两种版本:社区版 - 开放的Sourcenetwork版 - 额外的商业功能
在本教程中,我们将在CentOS 8上安装Zimbra的开源版本| Rhel 8 Linux服务器。
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3953.RHEL8_64.20170629025823.tgz
提取文件:
tar xvf zcs-8.8.15_GA_3953.RHEL8_64.20170629025823.tgz
第4步:在CentOS 8上安装Zimbra Collaboration Suite
将服务器IP和DNS名称添加到/etc/hosts文件。
$sudo vim /etc/hosts 95.217.220.155 mail.theitroad.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
将保存ZCS归档Tar文件保存的目录登录返回Zimbra Server和CD。
cd zcs-8.8.15_GA_3953.RHEL8_64.20170629025823
在我们看到的目录中:Readme.txt - Readme FileInstall.sh - 安装installData/- 包含安装数据库/ - 包含zcs rpmsdocs/- 更多文档
我们将通过运行install.sh脚本开始安装。
sudo ./install.sh
1.
执行"y"以接受许可条款并开始安装。
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软件包将启动.x
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.20170705-161319.log Installing LDAP configuration database...done. Setting defaults...
将DNS错误设置为我们添加DNS条目的主域时,设置邮件域。
... DNS ERROR resolving MX for mail.theitroad.com It is suggested that the domain name have an MX record configured in DNS Change domain name? [Yes] Create domain: [mail.theitroad.com] theitroad.com MX: mail.theitroad.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: 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: mail.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: //mail.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 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: Hyman@theitroad ** 4) Admin Password UNSET 5) Anti-virus quarantine user: Hyman@theitroad 6) Enable automated spam training: yes 7) Spam training user: Hyman@theitroad 8) Non-spam(Ham) training user: Hyman@theitroad 9) SMTP host: mail.theitroad.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.theitroad.com:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: Hyman@theitroad 22) Version update source email: Hyman@theitroad 23) Install mailstore (service webapp): yes 24) Install UI (zimbra,zimbraAdmin webapps): yes Select, or 'r' for previous menu [r] 4 Password for Hyman@theitroad (min 6 characters): [8IFLmFH7Wr] <Enter-or-set-your-own-password>
返回上一个菜单,然后点击开始安装的键。
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 Mail Server | RHEL 8.如果安装成功,我们将收到类似于下面的输出。
Operations logged to /tmp/zmsetup.20170705-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.theitroad.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.theitroad.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.theitroad.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.theitroad.com...done. Initializing mta config...done. Setting services on mail.theitroad.com...done. Adding mail.theitroad.com to zimbraMailHostPool in default COS...done. Creating domain theitroad.com...done. Setting default domain name...done. Creating domain theitroad.com...already exists. Creating admin account Hyman@theitroad Creating root alias...done. Creating postmaster alias...done. Creating user Hyman@theitroad Creating user Hyman@theitroad Creating user Hyman@theitroad Setting spam training and Anti-virus quarantine accounts...done. Initializing store sql database...done. Setting zimbraSmtpHostname for mail.theitroad.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 (Hyman@theitroad) 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&Hyman@theitroad Notification complete Checking if the NG started running...done. Setting up zimbra crontab...done. Moving /tmp/zmsetup.20170705-161319.log to /opt/zimbra/log Configuration complete - press return to exit
确认Zimbra服务状态。
$sudo su - zimbra -c "zmcontrol status" Host mail.theitroad.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的Secure Zimbra Server进行加密SSL证书
第6步:访问Zimbra Admin Dashboard
如果我们有活动防火墙,请在"开放端口"中查看我们的教程:
Zimbra防火墙配置与UFW和FireWalld
现在我们在CentOS 8上安装Zimbra | Rhel 8完成让我们打开管理控制台https://ip-addres | hostname:7071
使用前面配置的用户名管理员和密码登录。
确认所有Zimbra服务在"监视器"部分下处于运行状态。