Centos 7 搭建 Zimbra 邮件服务器
2016-02-25 11:24
579 查看
Zimbra协作套件(ZCS)是一个由Zimbra群件产品,在世界各地广泛使用。用户可以使用一个非常丰富的网络接口来共享文件夹、联系人、日程安排和其他的东西。目前协作套件的最新版本是Zimbra 8.6.0。它带来了新的功能,改进的邮件服务器,它提供了一个更好的网络客户端体验。
下面我通过 Centos 7 来搭建 webmail -> zimbra 邮件服务器,并且验证向外网发送邮件是否正常,顺便记录一下,方便日后查看~
1、配置 /etc/hosts 和 /etc/hostname
我在这边设置FQDN为www.hongxue.com,主机名也是www.hongxue.com
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/1e2b4306ee97e192ae14d782335a7bde)
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/7d4026d77fbd5a5bfe253fecc23689ac)
2、关闭selinux和在防火墙中允许zimbra端口
由于是测试环境,所以防火墙已经关闭,selinux也要关闭
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/13c25f6beee7a64e822b85031c2d6bef)
3、停止任何安装在该Centos7 Server上面的 MTA服务
systemctl stop postfix
systemctl disable postfix
systemctl stop sendmail
systemctl disable sendmail
4、更新操作系统
yum update -y
5、安装所需的依赖包和库文件
yum install perl perl-core ntpl nmap sudo libidn gmp libaio libstdc++ unzip sysstat sqlite nc -y
6、下载 ZCS 6.0 安装包,解压,安装。
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/bd287cd64495c72ba34b4988be629108)
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/e5048934014bf2aec93141318c8276c2)
好,下面是最重要的一部分了,安装!
7、ok,上一步已经完成安装,下面我们来查看服务启动状态,服务已经启动~
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/66b314f8d42508599c6c76bdd3a1c1e3)
8、查看管理员界面
https://10.1.0.100:7071
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/f7359fbdee7945bbb6f3d219e1a9feb7)
创建一个普通用户
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/d18a64fd379443634bfd72b18cec9cb1)
9、向外网发送邮件,验证是否成功
https://10.1.0.100 登录用户界面
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/cefacd12548655bb44ee7db6d125bdc5)
![](https://oscdn.geek-share.com/Uploads/Images/Content/201602/25/debd9ef64bc0034f875fe22c57b87890)
新建邮件并且发送:
![](http://img.blog.csdn.net/20160225112056378)
邮件接受成功~ 实验环境至此结束,如果需要接收外网邮件,那么需要DNS解析MX记录,并且需要有一个外网ip供 zimbra使用,可以是通过NAT模式,但是需要映射zimbra的所需端口。
下面我通过 Centos 7 来搭建 webmail -> zimbra 邮件服务器,并且验证向外网发送邮件是否正常,顺便记录一下,方便日后查看~
1、配置 /etc/hosts 和 /etc/hostname
我在这边设置FQDN为www.hongxue.com,主机名也是www.hongxue.com
2、关闭selinux和在防火墙中允许zimbra端口
由于是测试环境,所以防火墙已经关闭,selinux也要关闭
3、停止任何安装在该Centos7 Server上面的 MTA服务
systemctl stop postfix
systemctl disable postfix
systemctl stop sendmail
systemctl disable sendmail
4、更新操作系统
yum update -y
5、安装所需的依赖包和库文件
yum install perl perl-core ntpl nmap sudo libidn gmp libaio libstdc++ unzip sysstat sqlite nc -y
6、下载 ZCS 6.0 安装包,解压,安装。
好,下面是最重要的一部分了,安装!
[root@www zcs-8.6.0_GA_1153.RHEL7_64.20141215151110]# ./install.sh --platform-override Operations logged to /tmp/install.log.31333 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 # 输入y同意安装 Do you agree with the terms of the software license agreement? y Checking for prerequisites... FOUND: NPTL FOUND: nmap-ncat-6.40-7 FOUND: sudo-1.8.6p7-16 FOUND: libidn-1.28-4 FOUND: gmp-6.0.0-12 FOUND: libaio-0.3.109-13 FOUND: libstdc++-4.8.5-4 FOUND: unzip-6.0-15 FOUND: perl-core-5.16.3-286 Checking for suggested prerequisites... FOUND: perl-5.16.3 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 #输入Y安装zimbra所需组件 Select the packages to install Install zimbra-ldap [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 # 输入Y确认操作修改 The system will be modified. Continue? 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...done 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/zmsetup02252016-105150.log Installing LDAP configuration database...done. Setting defaults... MX: smtp.asia.secureserver.net (182.50.144.66) MX: mailstore1.asia.secureserver.net (182.50.144.67) Interface: 127.0.0.1 Interface: ::1 Interface: 10.1.0.100 182.50.144.66 182.50.144.66 182.50.144.66 182.50.144.67 182.50.144.67 182.50.144.67 # 这边会有一个报错,由于是测试环境,我们并没有添加MX邮件主机记录,所以不用理它,选择no DNS ERROR - none of the MX records for hongxue.com resolve to this host Change domain name? [Yes] 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@hongxue.com ******* +Admin Password UNSET +Anti-virus quarantine user: virus-quarantine.92q5ww2xk@hongxue.com +Enable automated spam training: yes +Spam training user: spam.4jzqlif9fd@hongxue.com +Non-spam(Ham) training user: ham.bhxkaz_w@hongxue.com +SMTP host: hongxue.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: http://hongxue.com:7780/aspell.php +Enable version update checks: TRUE +Enable version update notifications: TRUE +Version update notification email: admin@hongxue.com +Version update source email: admin@hongxue.com +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 # 这边我们先选择7 Address unconfigured (**) items (? - help) 7 Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@hongxue.com ** 4) Admin Password UNSET 5) Anti-virus quarantine user: virus-quarantine.92q5ww2xk@hongxue.com 6) Enable automated spam training: yes 7) Spam training user: spam.4jzqlif9fd@hongxue.com 8) Non-spam(Ham) training user: ham.bhxkaz_w@hongxue.com 9) SMTP host: hongxue.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: http://hongxue.com:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@hongxue.com 22) Version update source email: admin@hongxue.com 23) Install mailstore (service webapp): yes 24) Install UI (zimbra,zimbraAdmin webapps): yes # 接着选择4,设置 admin password Select, or 'r' for previous menu [r] 4 Password for admin@hongxue.com (min 6 characters): [1ewBUZwGo] hongxuepassword Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@hongxue.com 4) Admin Password set 5) Anti-virus quarantine user: virus-quarantine.92q5ww2xk@hongxue.com 6) Enable automated spam training: yes 7) Spam training user: spam.4jzqlif9fd@hongxue.com 8) Non-spam(Ham) training user: ham.bhxkaz_w@hongxue.com 9) SMTP host: hongxue.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: http://hongxue.com:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@hongxue.com 22) Version update source email: admin@hongxue.com 23) Install mailstore (service webapp): yes 24) Install UI (zimbra,zimbraAdmin webapps): yes # 按r回到上一级菜单 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 # 下面按a以完成配置,并且yes下去,继续修改即可。之后就是zimbra自动一系列的配置了~ *** CONFIGURATION COMPLETE - press 'a' to apply Select from menu, or press 'a' to apply config (? - help) a Save configuration data to a file? [Yes] yes Save config in file: [/opt/zimbra/config.41215] Saving config in /opt/zimbra/config.41215...done. The system will be modified - continue? [No] yes Operations logged to /tmp/zmsetup02252016-105150.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 hongxue.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 hongxue.com...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 hongxue.com...done. Adding hongxue.com to zimbraMailHostPool in default COS...done. Creating domain hongxue.com...done. Setting default domain name...done. Creating domain hongxue.com...already exists. Creating admin account admin@hongxue.com...done. Creating root alias...done. Creating postmaster alias...done. Creating user spam.4jzqlif9fd@hongxue.com...done. Creating user ham.bhxkaz_w@hongxue.com...done. Creating user virus-quarantine.92q5ww2xk@hongxue.com...done. Setting spam training and Anti-virus quarantine accounts...done. Initializing store sql database...done. Setting zimbraSmtpHostname for hongxue.com...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@hongxue.com) # 跳过通知zimbra Notify Zimbra of your installation? [Yes] no Notification skipped Setting up zimbra crontab...done. Moving /tmp/zmsetup02252016-105150.log to /opt/zimbra/log Configuration complete - press return to exit
7、ok,上一步已经完成安装,下面我们来查看服务启动状态,服务已经启动~
8、查看管理员界面
https://10.1.0.100:7071
创建一个普通用户
9、向外网发送邮件,验证是否成功
https://10.1.0.100 登录用户界面
新建邮件并且发送:
邮件接受成功~ 实验环境至此结束,如果需要接收外网邮件,那么需要DNS解析MX记录,并且需要有一个外网ip供 zimbra使用,可以是通过NAT模式,但是需要映射zimbra的所需端口。
相关文章推荐
- 菜猫学习linux笔记(1)
- linux输入子系统之按键驱动
- linux常用基本命令之二十一 md5sum
- linux 多线程、多进程简介
- 【Linux运维入门】Linux环境安装SonarQube和SonarQube Runner
- linux平台下防火墙iptables原理
- Linux下Vim工具常用命令
- Linux Makefile gcc g++
- Linux下超级命令htop的学习使用
- Linux下Git用法总结
- centos iptables 防火墙设置
- 【小镇的技术天梯】Linux Proc 文件系统
- 《配置Linux软件下载更新源地址》
- Linux中的格式输出---Printf用法
- Java判断运行系统是linux还是windows
- Linux常用命令
- linux下设置SSH服务开机启动
- linux一些不常用单很有用的命令
- Linux 下Nagios的安装和配置
- 《Linux系统基础优化16条知识汇总》