阿里云 CentOS 6.10 全新安装 Zimbra 8.8.12

系统环境:阿里云香港 CentOS 6.10 x64

软件环境:zcs-8.8.12_GA_3794.RHEL6_64.20190329045002.tgz

 

一、环境配置

1. 开放端口

需要开放端口如下:

80, 443, 25, 110, 143, 465, 995, 993, 587, 7025, 8443, 7071

2. 停止服务器上已有服务

/etc/init.d/sendmail stop
chkconfig sendmail off
/etc/init.d/postfix stop
chkconfig postfix off

3. 配置主机名

vim /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=mail.chenxie.net

4. 配置 hosts

vim /etc/hosts

172.16.12.247   mail.chenxie.net mail

5. 重启系统,确保都生效了

reboot

 

二、安装 dnsmasq

1. 安装 dnsmasq

yum install -y dnsmasq bind-utils

2. 配置dnsmasq:

vim /etc/dnsmasq.conf

添加以下到文件末尾:

server=127.0.0.1
domain=chenxie.net
mx-host=chenxie.net,mail.chenxie.net,5

3. 配置DNS

vim /etc/resolv.conf

添加以下到文件首行:

nameserver 127.0.0.1

4. 启动 dnsmasq:

/etc/init.d/dnsmasq start

5. 测试:

# dig MX chenxie.net

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6_10.1 <<>> MX chenxie.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3753
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;chenxie.net.                   IN      MX

;; ANSWER SECTION:
chenxie.net.            0       IN      MX      5 mail.chenxie.net.

;; ADDITIONAL SECTION:
mail.chenxie.net.       0       IN      A       172.16.12.247

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed May 29 11:28:59 2019
;; MSG SIZE  rcvd: 77

 

三、安装Zimbra

将下载好的安装文件上传到 /opt/software/ 我这里是:zcs-8.8.12_GA_3794.RHEL6_64.20190329045002.tgz  ,然后开始安装,安装如下:

[root@mail ~]# cd /opt/software/
[root@mail software]# ll
total 253692
-rw-r--r-- 1 root root 259778180 May 29 11:31 zcs-8.8.12_GA_3794.RHEL6_64.20190329045002.tgz
[root@mail software]# tar -zxf zcs-8.8.12_GA_3794.RHEL6_64.20190329045002.tgz 
[root@mail software]# cd zcs-8.8.12_GA_3794.RHEL6_64.20190329045002
[root@mail zcs-8.8.12_GA_3794.RHEL6_64.20190329045002]# ll
total 44
drwxrwxr-x 2 503 503 4096 Mar 29 17:54 bin
drwxrwxr-x 2 503 503 4096 Mar 29 17:54 data
drwxrwxr-x 3 503 503 4096 Mar 29 17:54 docs
-rwxr-xr-x 1 503 503 8873 Mar 29 17:54 install.sh
drwxrwxr-x 3 503 503 4096 Mar 29 17:54 lib
drwxrwxr-x 2 503 503 4096 Mar 29 17:54 packages
-rw-rw-r-- 1 503 503  369 Mar 29 17:54 readme_binary_en_US.txt
-rw-rw-r-- 1 503 503  428 Mar 29 17:54 README.txt
drwxrwxr-x 3 503 503 4096 Mar 29 17:54 util
[root@mail zcs-8.8.12_GA_3794.RHEL6_64.20190329045002]# ./install.sh 

Operations logged to /tmp/install.log.Itot2lsJ
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





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

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

Install zimbra-drive [Y] y

Install zimbra-imapd (BETA - for evaluation only) [N] y

Install zimbra-chat [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

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

Beginning Installation - see /tmp/install.log.Itot2lsJ for details...

                          zimbra-core-components will be downloaded and installed.
                            zimbra-timezone-data will be installed.
                         zimbra-common-mbox-conf will be installed.
                           zimbra-common-mbox-db will be installed.
                    zimbra-common-mbox-conf-msgs will be installed.
                  zimbra-common-mbox-conf-rights will be installed.
                         zimbra-common-mbox-docs will be installed.
                          zimbra-common-core-jar will be installed.
                   zimbra-common-mbox-native-lib will be installed.
                   zimbra-common-mbox-conf-attrs will be installed.
                         zimbra-common-core-libs 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.
                         zimbra-store-components will be downloaded and installed.
                       zimbra-jetty-distribution will be downloaded and installed.
                                 zimbra-mbox-war will be installed.
                                zimbra-mbox-conf will be installed.
                             zimbra-mbox-service will be installed.
                          zimbra-mbox-store-libs will be installed.
                   zimbra-mbox-admin-console-war 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.
                                zimbra-memcached will be downloaded and installed.
                         zimbra-proxy-components will be downloaded and installed.
                                    zimbra-proxy will be installed.
                                    zimbra-drive will be downloaded and installed (later).
                                    zimbra-imapd will be installed.
                                    zimbra-patch will be downloaded and installed (later).
                                zimbra-mta-patch will be downloaded and installed (later).
                              zimbra-proxy-patch will be downloaded and installed (later).
                                     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-store-components
   zimbra-jetty-distribution
   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-store-components
   zimbra-jetty-distribution
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
      ...done

Installing local packages (27):
   zimbra-timezone-data
   zimbra-common-mbox-conf
   zimbra-common-mbox-db
   zimbra-common-mbox-conf-msgs
   zimbra-common-mbox-conf-rights
   zimbra-common-mbox-docs
   zimbra-common-core-jar
   zimbra-common-mbox-native-lib
   zimbra-common-mbox-conf-attrs
   zimbra-common-core-libs
   zimbra-core
   zimbra-ldap
   zimbra-logger
   zimbra-mta
   zimbra-dnscache
   zimbra-snmp
   zimbra-mbox-war
   zimbra-mbox-conf
   zimbra-mbox-service
   zimbra-mbox-store-libs
   zimbra-mbox-admin-console-war
   zimbra-mbox-webclient-war
   zimbra-store
   zimbra-apache
   zimbra-spell
   zimbra-proxy
   zimbra-imapd
      ...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.20190529-114029.log
Installing LDAP configuration database...done.
Setting defaults...

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

        Interface: 172.16.12.247
        Interface: 127.0.0.1
done.
Checking for port conflicts
Port conflict detected: 25 (zimbra-mta)
Port conflict detected: 53 (zimbra-dnscache)
Port conflicts detected! - Press Enter/Return key to continue 

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@chenxie.net             
******* +Admin Password                        UNSET                         
        +Anti-virus quarantine user:           virus-quarantine.jjpd0btkqz@chenxie.net
        +Enable automated spam training:       yes                           
        +Spam training user:                   spam.phy5nguugc@chenxie.net   
        +Non-spam(Ham) training user:          ham.emck7bogle@chenxie.net    
        +SMTP host:                            mail.chenxie.net              
        +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.chenxie.net:7780/aspell.php
        +Enable version update checks:         TRUE                          
        +Enable version update notifications:  TRUE                          
        +Version update notification email:    admin@chenxie.net             
        +Version update source email:          admin@chenxie.net             
        +Install mailstore (service webapp):   yes                           
        +Install UI (zimbra,zimbraAdmin webapps): yes                           

   8) zimbra-spell:                            Enabled                       
   9) zimbra-proxy:                            Enabled                       
  10) zimbra-imapd:                            Enabled                       
  11) 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:                    admin@chenxie.net             
** 4) Admin Password                           UNSET                         
   5) Anti-virus quarantine user:              virus-quarantine.jjpd0btkqz@chenxie.net
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      spam.phy5nguugc@chenxie.net   
   8) Non-spam(Ham) training user:             ham.emck7bogle@chenxie.net    
   9) SMTP host:                               mail.chenxie.net              
  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.chenxie.net:7780/aspell.php
  19) Enable version update checks:            TRUE                          
  20) Enable version update notifications:     TRUE                          
  21) Version update notification email:       admin@chenxie.net             
  22) Version update source email:             admin@chenxie.net             
  23) Install mailstore (service webapp):      yes                           
  24) Install UI (zimbra,zimbraAdmin webapps): yes                           

Select, or 'r' for previous menu [r] 4

Password for admin@chenxie.net (min 6 characters): [o1LsBp_AJ] 123456

Store configuration

   1) Status:                                  Enabled                       
   2) Create Admin User:                       yes                           
   3) Admin user to create:                    admin@chenxie.net             
   4) Admin Password                           set                           
   5) Anti-virus quarantine user:              virus-quarantine.jjpd0btkqz@chenxie.net
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      spam.phy5nguugc@chenxie.net   
   8) Non-spam(Ham) training user:             ham.emck7bogle@chenxie.net    
   9) SMTP host:                               mail.chenxie.net              
  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.chenxie.net:7780/aspell.php
  19) Enable version update checks:            TRUE                          
  20) Enable version update notifications:     TRUE                          
  21) Version update notification email:       admin@chenxie.net             
  22) Version update source email:             admin@chenxie.net             
  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) zimbra-imapd:                            Enabled                       
  11) 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] yes
Save config in file: [/opt/zimbra/config.7309] 
Saving config in /opt/zimbra/config.7309...done.
The system will be modified - continue? [No] yes
Operations logged to /tmp/zmsetup.20190529-114029.log
Setting local config values...done.
Initializing core config...Setting up CA...done.
Deploying CA to /opt/zimbra/conf/ca ...done.
Creating SSL zimbra-imapd certificate...done.
Creating new zimbra-store SSL 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 imapd 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.chenxie.net...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.chenxie.net...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.chenxie.net 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 '1537783098'
Setting TimeZone Preference...done.
Disabling strict server name enforcement on mail.chenxie.net...done.
Initializing mta config...done.
Setting services on mail.chenxie.net...done.
Adding mail.chenxie.net to zimbraMailHostPool in default COS...done.
Creating domain chenxie.net...done.
Setting default domain name...done.
Creating domain chenxie.net...already exists.
Creating admin account admin@chenxie.net...done.
Creating root alias...done.
Creating postmaster alias...done.
Creating user spam.phy5nguugc@chenxie.net...done.
Creating user ham.emck7bogle@chenxie.net...done.
Creating user virus-quarantine.jjpd0btkqz@chenxie.net...done.
Setting spam training and Anti-virus quarantine accounts...done.
Initializing store sql database...done.
Setting zimbraSmtpHostname for mail.chenxie.net...done.
Configuring SNMP...done.
Setting up syslog.conf...done.
Enabling IMAP protocol for zimbra-imapd service...done.
Enabling IMAPS protocol for zimbra-imapd service...done.
Starting servers...Search error: Unable to determine enabled services from ldap.
Enabled services read from cache. Service list may be inaccurate.
done.
Installing common zimlets...
        com_zimbra_tooltip...failed. This may impact system functionality.
        com_zimbra_mailarchive...failed. This may impact system functionality.
        com_zimbra_phone...failed. This may impact system functionality.
        com_zimbra_adminversioncheck...failed. This may impact system functionality.
        com_zimbra_attachmail...failed. This may impact system functionality.
        com_zimbra_url...failed. This may impact system functionality.
        com_zimbra_email...failed. This may impact system functionality.
        com_zimbra_srchhighlighter...failed. This may impact system functionality.
        com_zimbra_bulkprovision...failed. This may impact system functionality.
        com_zimbra_attachcontacts...failed. This may impact system functionality.
        com_zimbra_date...failed. This may impact system functionality.
        com_zextras_chat_open...failed. This may impact system functionality.
        com_zimbra_webex...failed. This may impact system functionality.
        com_zimbra_proxy_config...failed. This may impact system functionality.
        com_zextras_drive_open...failed. This may impact system functionality.
        com_zimbra_clientuploader...failed. This may impact system functionality.
        com_zimbra_cert_manager...failed. This may impact system functionality.
        com_zimbra_ymemoticons...failed. This may impact system functionality.
        com_zimbra_viewmail...failed. This may impact system functionality.
Finished installing common zimlets.
Restarting mailboxd...done.
Creating galsync account for default domain...failed.

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.12_GA_3794_RHEL6_64)
        The ADMIN EMAIL ADDRESS created (admin@chenxie.net)

Notify Zimbra of your installation? [Yes] no
Notification skipped
Checking if the NG started running...done. 
Setting up zimbra crontab...done.


Moving /tmp/zmsetup.20190529-114029.log to /opt/zimbra/log


Configuration complete - press return to exit 


[root@mail zcs-8.8.12_GA_3794.RHEL6_64.20190329045002]#

 

重要:安装完成,移除文件 /etc/resolv.conf  第一行的 nameserver 127.0.0.1  然后重启系统。

 

启动之后查看服务运行状态:

[root@mail ~]# /etc/init.d/zimbra status
Host mail.chenxie.net
        amavis                  Running
        antispam                Running
        antivirus               Running
        dnscache                Running
        imapd                   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

全部成功启动。

 

接下来设置DNS解析:

在你的域名解析商那里分别添加2条记录:一条A记录,一条MX记录

如下(阿里云):

 

设置好后,稍等一会等待生效后即可通过域名访问。

 

普通用户访问地址为:https://mail.chenxie.net/

管理员访问地址为:https://mail.chenxie.net:7071/

  • 管理员用户名:admin
  • 管理员密码:即安装时提示你设置的密码,我这里是123456

 

你可能还需要做一下设置:

1. 添加SMTP认证:zimbra 开启smtp认证,防止伪造本域发件人发送垃圾邮件

2. 给Zimbra添加可信任的SSL证书:使用 LetsEncrypt 为 zimbra8.7.1 安装可信任的SSL证书     zimbra8.7 Let’s Encrypt ssl证书续期脚本

 

提示:

我们Zimbra邮件系统已经装好了,但是由于阿里默认禁止25端口出去,所以还需要去阿里云控制台申请25端口解封。

登录阿里云后点击头像-->安全管控-->25端口解封,输入你的IP即关联域名,提交申请。

版权声明:
作者:admin
链接:https://www.chenxie.net/archives/2090.html
来源:蜀小陈
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>