Zimbra邮件系统的环境部署(centos6.7)

                                     搭建zimbra邮件系统

一、安装环境配置

1)系统:centos6.7 64w位

2)软件版本:zcs-8.6.0_GA_1153.RHEL6_64.20141215151155

3)ip:192.168.75.11


二、安装前准备

1)配置主机名

[root@lxb zcs]# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=lxb.com

2)配置DNS

[root@lxb zcs]# vim /etc/resolv.conf

; generated by /sbin/dhclient-script
search lxb.com
nameserver 192.168.75.11
nameserver 114.114.114.114
3)更改hosts解析记录

[root@lxb zcs]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.75.11   mail.lxb.com lxb.com


三、安装及配置bind

[root@lxb zcs]# yum -y  install bind-utils  sysstat  compat-libstdc++* file  bind*   libstdc++*  libstdc++.so.6 nc

其中libstdc++.so.6没有安装则报错:libstdc++.so.6:connot open shared object file: No such file or directory

[root@lxb zcs]# vim /var/named/chroot/etc/named/named.conf

Zimbra邮件系统的环境部署(centos6.7)_第1张图片

1)配置文件正确性检查,没有任何提示就表示正确
named-checkconf /var/named/chroot/etc/named/named.conf

2)创建正向解析文件
[root@lxb zcs]#vim /var/named/chroot/var/named/lxb.com.zone

Zimbra邮件系统的环境部署(centos6.7)_第2张图片

3)创建反向解析文件
[root@lxb zcs]#vim /var/named/chroot/var/named/192.168.75.arpa

Zimbra邮件系统的环境部署(centos6.7)_第3张图片

4)解析文件正确性检查,出现OK提示就表示正确
[root@lxb ~]# named-checkzone lxb.com /var/named/chroot/var/named/lxb.com.zone
zone lxb.com/IN: loaded serial 20160215

OK

[root@lxb ~]# named-checkzone lxb.com /var/named/chroot/var/named/192.168.75.arpa
zone lxb.com/IN: loaded serial 20160215
OK

Zimbra邮件系统的环境部署(centos6.7)_第4张图片

5)把原来的配置文件改名,应用刚才创建的配置文件
mv /etc/named.conf  /etc/named.conf.bak
ln -s /var/named/chroot/etc/named/named.conf /etc/
service named start
chkconfig named on


四、开始安装
tar xvf  zcs-8.6.0_GA_1153.RHEL6_64.20141215151155.tgz

mv  zcs-8.6.0_GA_1153.RHEL6_64.20141215151155/ zcs
cd zcs
[root@lxb zcs]# ./install.sh --platform-override   

由于是centos使用redhat安装包,所以安装要添加参数�Cplatform-override

Operations logged to /tmp/install.log.9515
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
Checking for prerequisites...
     FOUND: NPTL
     FOUND: sudo-1.8.6p3-7
     FOUND: libidn-1.18-2
     FOUND: gmp-4.3.1-7
     MISSING: /usr/lib/libstdc++.so.6    (注:前面已安装 libstdc++*包,这步不会报错)
Checking for suggested prerequisites...
     FOUND: sysstat
     FOUND: sqlite
###ERROR###
One or more prerequisite packages are missing.
Please install them before running this installer.
Installation cancelled. 注意,如果这步失败,那么请用命令hostname检查你的主机名,确保你的主机名在hosts文件里面有对应本机IP的记录
  34. Checking for prerequisites...
  35.      FOUND: NPTL
  36.      FOUND: sudo-1.7.2p1-5
  37.      FOUND: libidn-0.6.5-1.1
  38. libidn-0.6.5-1.1
  39.      FOUND: gmp-4.1.4-10
  40.      FOUND: /usr/lib64/libstdc++.so.6
  41. Checking for suggested prerequisites...
  42.     FOUND: perl-5.8.8
  43.     FOUND: sysstat
  44. Prerequisite check complete.
  45.
如果这里报错说什么没有安装,查看前面FOUND XX 那段,什么没有找到就用yum安装什么,如
yum install nc -y
  46. Checking for installable packages
  47.
  48. Found zimbra-core
  49. Found zimbra-ldap
  50. Found zimbra-logger
  51. Found zimbra-mta
  52. Found zimbra-snmp
  53. Found zimbra-store
  54. Found zimbra-apache
  55. Found zimbra-spell
  56. Found zimbra-memcached
  57. Found zimbra-proxy
  60. Select the packages to install
选择默认安装:(以下到两个连续N及之前都直接回车)
   1. Install zimbra-ldap [Y]
   2.
   3. Install zimbra-logger [Y]
  4.
   5. Install zimbra-mta [Y]
   6.
   7. Install zimbra-snmp [Y]
  8.
   9. Install zimbra-store [Y]
  10.
  11. Install zimbra-apache [Y]
  12.
  13. Install zimbra-spell [Y]
  14.
  15. Install zimbra-memcached [N]
  16.
  17. Install zimbra-proxy [N]
  18. Checking required space for zimbra-core
  19. checking space for zimbra-store
  20.
  21. Installing:
  22.     zimbra-core
  23.     zimbra-ldap
  24.     zimbra-logger
  25.     zimbra-mta
  26.     zimbra-snmp
  27.     zimbra-store
  28.     zimbra-apache
  29.     zimbra-spell
  30.
  31. You appear to be installing packages on a platform different
  32. than the platform for which they were built.
  33.
  34. This platform is CentOS5_64
  35. Packages found: RHEL5_64
  36. This may or may not work.
  37.
  38. Using packages for a platform in which they were not designed for
  39. may result in an installation that is NOT usable. Your support
  40. options may be limited if you choose to continue.
  41.
  42.
这下面开始手动输入相关配置并回车
  43. Install anyway? [N] y
  44.
  45. The system will be modified.  Continue? [N] yes
  46.
  47. Removing /opt/zimbra
  48. Removing zimbra crontab entry...done.
  49. done.
  50. Cleaning up zimbra init scripts...done.
  51. Cleaning up /etc/ld.so.conf...done.
  52. Cleaning up /etc/prelink.conf...done.
  53. Cleaning up /etc/security/limits.conf...done.
  54.
  55. Finished removing Zimbra Collaboration Suite.
  56.
  57. Installing packages
  58.
  59.     zimbra-core......zimbra-core-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  60.     zimbra-ldap......zimbra-ldap-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  61.     zimbra-logger......zimbra-logger-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  62.     zimbra-mta......zimbra-mta-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  63.     zimbra-snmp......zimbra-snmp-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  64.     zimbra-store......zimbra-store-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  65.     zimbra-apache......zimbra-apache-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  66.     zimbra-spell......zimbra-spell-6.0.10_GA_2692.RHEL5_64-20101215170845.x86_64.rpm...done
  67. Operations logged to /tmp/zmsetup.03082011-230427.log
  68. Installing LDAP configuration database...done.
  69. Setting defaults...
  70.
  71. DNS ERROR resolving MX for mail.lxb.com
  72. It is suggested that the domain name have an MX record configured in DNS
  73. Change domain name?[Yes] yes  如果你安装过程中没有这个步骤就继续往下
  74.
  75. 更改域名,主机名lxb.com,域名设置为lxb.com:
  76. Create domain: [mail.lxb.com] mail.lxb.com
  77.         MX: mail.lxb.com (192.168.0.1)
  78.
  79.         Interface: 192.168.0.1
  80.         Interface: 127.0.0.1
  81. done.
  82. Checking for port conflicts
   1. Main menu
   2.
   3.    1) Common Configuration:                                                  
   4.    2) zimbra-ldap:                             Enabled                       
   5.    3) zimbra-store:                            Enabled                       
   6.         +Create Admin User:                    yes                           
   7.         +Admin user to create:                 [email protected]           
   8. ******* +Admin Password                        UNSET                        
   9.         +Enable automated spam training:       yes                           
  10.         +Spam training user:                   [email protected]   
  11.         +Non-spam(Ham) training user:          [email protected]  
  12.         +Global Documents Account:             [email protected]            
  13.         +SMTP host:                            mail.lxb.com           
  14.         +Web server HTTP port:                 80                           
  15.         +Web server HTTPS port:                443                           
  16.         +Web server mode:                      http                          
  17.         +IMAP server port:                     143                           
  18.         +IMAP server SSL port:                 993                           
  19.         +POP server port:                      110                           
  20.         +POP server SSL port:                  995                           
  21.         +Use spell check server:               yes                           
  22.         +Spell server URL:                     http://zimbra.surmount.net:7780/aspell.php
  23.         +Configure for use with mail proxy:    FALSE                        
  24.         +Configure for use with web proxy:     FALSE                        
  25.         +Enable version update checks:         TRUE                          
  26.         +Enable version update notifications:  TRUE                          
  27.         +Version update notification email:    [email protected]          
  28.         +Version update source email:          [email protected]           
  29.
  30.    4) zimbra-mta:                              Enabled                       
  31.    5) zimbra-snmp:                             Enabled                       
  32.    6) zimbra-logger:                           Enabled                       
  33.    7) zimbra-spell:                            Enabled                       
  34.    8) Default Class of Service Configuration:                                
  35.    r) Start servers after configuration        yes                           
  36.    s) Save config to file                                                   
  37.    x) Expand menu                                                            
  38.    q) Quit             
设置网页管理端admin的登录密码:
   1. Address unconfigured (**) items  (? - help) 3  
   2.
   3.
   4. Store configuration
   5.
   6.    1) Status:                                  Enabled                       
   7.    2) Create Admin User:                       yes                           
   8.    3) Admin user to create:                    [email protected]           
   9. ** 4) Admin Password                           UNSET                        
  10.    5) Enable automated spam training:          yes                           
  11.    6) Spam training user:                      [email protected]   
  12.    7) Non-spam(Ham) training user:             [email protected]  
  13.    8) Global Documents Account:                [email protected]           
  14.    9) SMTP host:                               mail.lxb.com          
  15.   10) Web server HTTP port:                    80                           
  16.   11) Web server HTTPS port:                   443                           
  17.   12) Web server mode:                         http                          
  18.   13) IMAP server port:                        143                           
  19.   14) IMAP server SSL port:                    993                           
  20.   15) POP server port:                         110                           
  21.   16) POP server SSL port:                     995                           
  22.   17) Use spell check server:                  yes                           
  23.   18) Spell server URL:                        http://zimbra.surmount.net:7780/aspell.php
  24.   19) Configure for use with mail proxy:       FALSE                        
  25.   20) Configure for use with web proxy:        FALSE                        
  26.   21) Enable version update checks:            TRUE                          
  27.   22) Enable version update notifications:     TRUE                          
  28.   23) Version update notification email:       [email protected]          
  29.   24) Version update source email:             [email protected]           
  30.
  31. Select, or 'r' for previous menu [r] 4   
  32.
  33. Password for [email protected] (min 6 characters): [OUYQ0Ht8] 123456  这个为后台管理员admin的密码
  34.
  35. Store configuration
  36.
  37.    1) Status:                                  Enabled                       
  38.    2) Create Admin User:                       yes                           
  39.    3) Admin user to create:                    [email protected]           
  40.    4) Admin Password                           set                           
  41.    5) Enable automated spam training:          yes                           
  42.    6) Spam training user:                      [email protected]   
  43.    7) Non-spam(Ham) training user:             [email protected]  
  44.    8) Global Documents Account:                [email protected]           
  45.    9) SMTP host:                               mail.lxb.com          
  46.   10) Web server HTTP port:                    80                           
  47.   11) Web server HTTPS port:                   443                           
  48.   12) Web server mode:                         http                          
  49.   13) IMAP server port:                        143                           
  50.   14) IMAP server SSL port:                    993                           
  51.   15) POP server port:                         110                           
  52.   16) POP server SSL port:                     995                           
  53.   17) Use spell check server:                  yes                           
  54.   18) Spell server URL:                        http://zimbra.surmount.net:7780/aspell.php
  55.   19) Configure for use with mail proxy:       FALSE                        
  56.   20) Configure for use with web proxy:        FALSE                        
  57.   21) Enable version update checks:            TRUE                          
  58.   22) Enable version update notifications:     TRUE                          
  59.   23) Version update notification email:       [email protected]           
  60.   24) Version update source email:             [email protected]    
返回上层页面:
   1. Select, or 'r' for previous menu [r] r    这里返回上一步
   2.
   3. Main menu
   4.
   5.    1) Common Configuration:                                                  
   6.    2) zimbra-ldap:                             Enabled                       
   7.    3) zimbra-store:                            Enabled                       
   8.    4) zimbra-mta:                              Enabled                       
   9.    5) zimbra-snmp:                             Enabled                       
  10.    6) zimbra-logger:                           Enabled                       
  11.    7) zimbra-spell:                            Enabled                       
  12.    8) Default Class of Service Configuration:                                
  13.    r) Start servers after configuration        yes                           
  14.    s) Save config to file                                                   
  15.    x) Expand menu                                                            
  16.    q) Quit                                    
  17.
  18. *** CONFIGURATION COMPLETE - press 'a' to apply
输入“a”以应用配置:
   1. Select from menu, or press 'a' to apply config (? - help) a
   2. Save configuration data to a file? [Yes] yes
   3. Save config in file: [/opt/zimbra/config.11174]   直接回车
   4. Saving config in /opt/zimbra/config.11174...done.
   5. The system will be modified - continue? [No] yes
   6. Operations logged to /tmp/zmsetup.03082011-230427.log
   7. Setting local config values...done.
   8. Setting up CA...done.
   9. Deploying CA to /opt/zimbra/conf/ca ...done.
  10. Creating SSL certificate...done.
  11. Installing mailboxd SSL certificates...done.
  12. Initializing ldap...done.

安装到这步出错:

Tue Sep  2 01:17:17 2014 Initializing ldap...
Tue Sep  2 01:17:17 2014 *** Running as zimbra user: /opt/zimbra/libexec/zmldapinit
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
IO::Socket::INET6: connect: Connection refused at /opt/zimbra/libexec/zmldapinit line 137.
Tue Sep  2 01:17:57 2014 failed. (28416)
Tue Sep  2 01:17:57 2014 
 
ERROR
 
Tue Sep  2 01:17:57 2014 
 
Configuration failed
 
Tue Sep  2 01:17:57 2014 Please address the error and re-run /opt/zimbra/libexec/zmsetup.pl to
Tue Sep  2 01:17:57 2014 complete the configuration.
Tue Sep  2 01:17:57 2014 
Errors have been logged to /tmp/zmsetup.09022014-010215.log
 
 
Configuration failed

解决方案:

查看日志发现

Tue Sep  2 01:17:17 2014 *** Running as zimbra user: /opt/zimbra/libexec/zmldapinit

[root@lxb zcs]# passwd zimbra
Changing password for user zimbra.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@lxb zcs]# /opt/zimbra/libexec/zmsetup.pl
Operations logged to /tmp/zmsetup02152016-163802.log
Installing LDAP configuration database...done.
Setting defaults...

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

        Interface: 192.168.75.11
        Interface: 127.0.0.1
        Interface: ::1
done.
Checking for port conflicts
Port conflict detected: 389 (zimbra-ldap)
Port conflicts detected! - Press Enter/Return key to continue
Setting defaults from ldap...done.


Note

The previous configuration appears to have failed to complete

Attempt to complete configuration now? [yes]
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.23552]
Saving config in /opt/zimbra/config.23552...done.
The system will be modified - continue? [No] y
Operations logged to /tmp/zmsetup02152016-163802.log
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.lxb.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.lxb.com...done.
Setting zimbraFeatureTasksEnabled=TRUE...done.
Setting zimbraFeatureBriefcasesEnabled=TRUE...done.
Setting TimeZone Preference...done.
Initializing mta config...done.
Setting services on mail.lxb.com...done.
Adding mail.lxb.com to zimbraMailHostPool in default COS...done.
Creating domain lxb.com...done.
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.lxb.com...done.
Configuring SNMP...done.
Setting up syslog.conf...done.
Starting servers...Connect: Unable to determine enabled services from ldap.
done.
Installing common zimlets...
        com_zimbra_viewmail...failed. This may impact system functionality.
        com_zimbra_bulkprovision...failed. This may impact system functionality.
        com_zimbra_proxy_config...failed. This may impact system functionality.
        com_zimbra_adminversioncheck...failed. This may impact system functionality.
        com_zimbra_attachcontacts...failed. This may impact system functionality.
        com_zimbra_tooltip...failed. This may impact system functionality.
        com_zimbra_date...failed. This may impact system functionality.
        com_zimbra_phone...failed. This may impact system functionality.
        com_zimbra_mailarchive...failed. This may impact system functionality.
        com_zimbra_clientuploader...failed. This may impact system functionality.
        com_zimbra_srchhighlighter...failed. This may impact system functionality.
        com_zimbra_url...failed. This may impact system functionality.
        com_zimbra_ymemoticons...failed. This may impact system functionality.
        com_zimbra_attachmail...failed. This may impact system functionality.
        com_zimbra_cert_manager...failed. This may impact system functionality.
        com_zimbra_email...failed. This may impact system functionality.
        com_zimbra_webex...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.6.0_GA_1153_UNKNOWN_64)
        The ADMIN EMAIL ADDRESS created ([email protected])

Notify Zimbra of your installation? [Yes] no
Notification skipped
Setting up zimbra crontab...done.


Moving /tmp/zmsetup02152016-163802.log to /opt/zimbra/log


Configuration complete - press return to exit

    Zimbra邮件系统的环境部署(centos6.7)_第5张图片                      

你可能感兴趣的:(localhost,邮件系统,软件版本)