Zimbra公司协作套件 (ZCS)是一个开源的,对于电子邮件服务器协同平台,在两个版本的开发, 开源版 ( 免费 )和网络版 ( 付费 ),它提供的服务,如LDAP,SMTP,POP和IMAP,Webmail客户端,日历,任务,防病毒,反垃圾邮件和其他。
本教程介绍如何将一个CentOS / RHEL 7服务器上安装的Zimbra Collaboration Suite的开源版本 。
要求
- 用A和MX记录的有效外部DNS服务器指向您的Zimbra邮件服务器IP地址。
- 一个干净的安装CentOS 7没有任何邮件,数据库,LDAP,DNS或HTTP服务器正常运行。
- 分配给网络接口的静态IP地址。
第1步:安装系统软件包
1.在我们开始之前与Zimbra的协同套件安装过程中,第一次登录到具有root权限的服务器控制台和安装以下软件包:
# yum -y install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6
图01:安装Zimbra所需软件包
2.接下来,问题getenforce
命令在您的计算机上启用检查SELINUX。 万一被设置为策略Enforced
通过发出以下命令停用:
# getenforce # setenforce 0 # getenforce
图02:在CentOS 7中禁用SELinux
要在CentOS,完全打开禁用SELinux /etc/selinux/config
文件与文本编辑器和行SELINUX设置为禁用。
3.保证wget的系统实用程序也安装在系统上发出以下命令:
# yum install wget
第2步:配置系统主机名
4.为了Zimbra的正常运行必须设置本地计算机的主机名和FQDN通过运行root帐户下面的命令来指向你的服务器IP地址:
# 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
图03:设置系统主机名
第3步:添加静态IP地址
5.如果您的服务器使用DHCP动态IP地址,那么你需要编辑您的网络接口卡,并配置为使用静态IP地址。 通过获取网络接口的信息ip addr
的命令,并确定您的服务器的外部NIC(通常类似于enp0s3或为eth0)。
# ip addr
然后,运行nmtui-edit
对你需要更改设置和手动配置IP地址的接口的接口命令。 使用以下屏幕截图作为指南。
# nmtui-edit enp0s3
图04:获取网络接口详细信息和配置静态IP
图05:配置网络接口和DNS
第4步:禁用不需要的服务
6. CentOS 7默认安装附带Postfix守护已安装和运行。 要禁用和清除postfix服务,请运行以下命令:
# systemctl stop postfix # systemctl disable postfix # yum remove postfix
图06:禁用和删除Postfix
该服务已被删除的问题后, ss
,以检查命令,如果其他守护进程与Zimbra公司的服务不兼容,如LDAP,httpd的,Dovecot是您的系统上运行。 如果是这种情况,也删除它们。
第5步:安装Zimbra Collaboration Suite开源版
7.现在是时候来安装Zimbra的协同套件 。 转到Zimbra的协同套件下载页面 ,并发出以下命令抓住你的系统中的最新版本:
----------------- For RHEL/CentOS 7 ----------------- # wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz ----------------- For RHEL/CentOS 6 ----------------- # wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL6_64.20141215151155.tgz
图07:下载Zimbra Collaboration Suite
8.下载完成后,使用unzip命令解压压缩包,输入Zimbra公司提取目录并列出目录的内容,找到安装程序文件。
# tar xfz zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz # cd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110 # ls
9.现在,在执行启动名为安装脚本文件启动Zimbra的安装过程install.sh
。
在进行一系列系统检查后,安装程序将提示您接受许可证。 同意许可证(y)
以便与安装过程进一步继续。
# ./install.sh OR # ./install.sh --platform-override [On different platforms other than RHEL]
示例输出
Operations logged to /tmp/install.log.12951
Checking for existing installation...
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.
ZIMBRA, INC. ("ZIMBRA") 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 the Zimbra Collaboration Suite:
http://www.zimbra.com/license/zimbra-public-eula-2-5.html
Do you agree with the terms of the software license agreement? [N] y
10.接下来,安装过程中会提示你一系列的问题,以正确配置Zimbra的守护进程。 使用以下安装摘录,以便进一步设置zimbra服务。
Checking for prerequisites...
FOUND: NPTL
FOUND: sudo-1.8.6p7-13
FOUND: libidn-1.28-3
FOUND: gmp-6.0.0-11
FOUND: /usr/lib/libstdc++.so.6
Checking for suggested prerequisites...
FOUND: sysstat
FOUND: sqlite
Prerequisite check complete.
Checking for installable packages
Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-dnscache
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy
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 You appear to be installing packages on a platform different than the platform for which they were built. This platform is UNKNOWN_64 Packages found: RHEL7_64 This may or may not work. Using packages for a platform in which they were not designed for may result in an installation that is NOT usable. Your support options may be limited if you choose to continue. Install anyway? [N]y
12.最后,将开始的Zimbra安装过程。
The system will be modified. Continue? [N]y
Removing /opt/zimbra Removing zimbra crontab entry...done. Cleaning up zimbra init scripts...done. Cleaning up /etc/ld.so.conf...done. Cleaning up /etc/security/limits.conf...done. Finished removing Zimbra Collaboration Server. Installing packages zimbra-core......zimbra-core-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm... zimbra-ldap......zimbra-ldap-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-logger......zimbra-logger-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-mta......zimbra-mta-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-dnscache......zimbra-dnscache-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-snmp......zimbra-snmp-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-store......zimbra-store-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-apache......zimbra-apache-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-spell......zimbra-spell-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-memcached......zimbra-memcached-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-proxy......zimbra-proxy-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done Operations logged to /tmp/zmsetup01262016-002704.log Installing LDAP configuration database...done. Setting defaults...No results returned for A lookup of mail.centos7.lan Checked nameservers: 12.168.0.1 8.8.8.8 No results returned for AAAA lookup of mail.centos7.lan Checked nameservers: 12.168.0.1 8.8.8.8 DNS ERROR resolving mail.centos7.lan It is suggested that the hostname be resolvable via DNS Change hostname [Yes] yes Please enter the logical hostname for this host [mail.centos7.lan] No results returned for A lookup of mail.centos7.lan Checked nameservers: 12.168.0.1 8.8.8.8 DNS ERROR resolving mail.centos7.lan It is suggested that the hostname be resolvable via DNS Re-Enter hostname [Yes] no DNS ERROR resolving MX for mail.centos7.lan It is suggested that the domain name have an MX record configured in DNS Change domain name? [Yes] no done. Checking for port conflicts 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: admin@mail.centos7.lan ******* +Admin Password UNSET +Anti-virus quarantine user: virus-quarantine.7xi47__k@mail.centos7.lan +Enable automated spam training: yes +Spam training user: spam.wasleuiv@mail.centos7.lan +Non-spam(Ham) training user: ham.wzmkmrkq@mail.centos7.lan +SMTP host: mail.centos7.lan +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: http://mail.centos7.lan:7780/aspell.php +Enable version update checks: TRUE +Enable version update notifications: TRUE +Version update notification email: admin@mail.centos7.lan +Version update source email: admin@mail.centos7.lan +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
13.存储配置。
1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@mail.centos7.lan ** 4) Admin Password UNSET 5) Anti-virus quarantine user: virus-quarantine.7xi47__k@mail.centos7.lan 6) Enable automated spam training: yes 7) Spam training user: spam.wasleuiv@mail.centos7.lan 8) Non-spam(Ham) training user: ham.wzmkmrkq@mail.centos7.lan 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: admin@mail.centos7.lan 22) Version update source email: admin@mail.centos7.lan 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 admin@mail.centos7.lan (min 6 characters): [54mE0RmqN]enter admin password here
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@mail.centos7.lan
4) Admin Password set
5) Anti-virus quarantine user: virus-quarantine.7xi47__k@mail.centos7.lan
6) Enable automated spam training: yes
7) Spam training user: spam.wasleuiv@mail.centos7.lan
8) Non-spam(Ham) training user: ham.wzmkmrkq@mail.centos7.lan
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: admin@mail.centos7.lan
22) Version update source email: admin@mail.centos7.lan
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 admin@mail.centos7.lan...done. Creating root alias...done. Creating postmaster alias...done. Creating user spam.wasleuiv@mail.centos7.lan...done. Creating user ham.wzmkmrkq@mail.centos7.lan...done. Creating user virus-quarantine.7xi47__k@mail.centos7.lan...done. 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 (admin@mail.centos7.lan) 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.在安装完成后,打开Web浏览器,并通过HTTPS浏览到您的域名或机器运转的Zimbra服务的IP地址,端口7071的协议,接受证书安全性错误,并在安装过程中配置的凭据登录。 对于Zimbra的Web管理面板中的默认用户名为admin。
https://mail.centos7.lan:7071 or https://192.168.1.14:7071
Zimbra登录
15.一旦登录管理Web控制台就可以开始添加你自己的SSL证书,创建邮件账户,邮件别名等等。 只要记住,端口7071仅用于管理任务。
客户端可以使用域名或服务器IP地址通过HTTPS协议安全地登录到他们的网络邮件框。
https://mail.centos7.lan or https://192.168.1.14
用户Webmail登录
用户Webmail仪表板
恭喜! 现在你有一个完整的操作邮件安装在你的办公室。
第6步:删除或卸载Zimbra
如果您要卸载的Zimbra服务一起使用其组件运行与安装脚本-u
选项。
# ./install.sh -u
要删除Zimbra安装文件和目录,运行以下命令:
# cd # rm -rf zcs-*
作为最后一点,为了正确运行Zimbra Collaboration Suite,您需要一个功能强大的机器,最低要求为4GB的RAM。