先决条件:
1、系统环境配置:
操作系统:CentOS 6.5 x86_64(Zimbra不支持32位操作系统) 内网IP:192.168.0.240 Zimbra版本:Zimbra 8.6.0开源免费版 点击下载 邮箱域名:corp.net 主机名:mail.corp.net
软件依赖安装:yum -y install libidn11 curl fetchmail libpcre3 libgmp3c2 libxml2 libstdc++6 openssl perl sysstat libtool-ltdl compat-libstdc* nc file unzip libaio
2、DNS设置:
安装Zimbar需要先对域名设置MX记录,指向Zimbra服务器。如内部有DNS服务器器,可以先在DNS服务器上添加域名的记录,把Zimbra服务器的DNS指向DNS服务器IP;等安装完成后,再把DNS修改回原来的设置,最后做端口映射等。
在Zimbra服务器上用nslookup命令检测DNS的正确性:
# nslookup -q=mx corp.net Server:192.168.0.180 Address:192.168.0.180#53 Non-authoritative answer: corp.net mail exchanger = 5 mail.corp.net. # nslookup -q=a mail.corp.net Server:192.168.0.180 Address:192.168.0.180#53 Non-authoritative answer: Name:mail.corp.net Address: 192.168.0.240
安装准备:
1、关闭selinux
# vi /etc/selinux/config SELINUX=disabled
2、关闭iptables防火墙端口
# service iptables stop # chkconfig iptables off
3、关闭postfix服务,避免25端口被占用
# service postfix stop # chkconfig postfix off
4、配置主机名
# vi /etc/sysconfig/network HOSTNAME=mail.corp.net
5、配置hosts
# vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 #::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.240 mail.corp.net mail
6、空间要求
Zimbra会安装到/opt目录,请确保/opt目录有至少5G的可用容量
7、重启服务器,确保所有配置生效
# reboot
安装:
1、把下载的Zimbra安装包上传到/opt
2、解压
# cd /opt # tar -zxvf zcs-8.6.0_GA_1153.RHEL6_64.20141215151155.tgz # cd zcs-8.6.0_GA_1153.RHEL6_64.20141215151155
3、运行安装脚本开始安装(安装过程中请按照下面红色字符进行操作)
[root@mail zcs-8.6.0_GA_1153.RHEL6_64.20141215151155]# ./install.sh
到此处输入y,回车继续
Do you agree with the terms of the software license agreement? [N] y
到下面发现MISSING缺少包:
Checking for prerequisites... FOUND: NPTL MISSING: nc FOUND: sudo-1.8.6p3-12 FOUND: libidn-1.18-2 FOUND: gmp-4.3.1-7 MISSING: libaio-0.3.107-10 FOUND: libstdc++-4.4.7-4 MISSING: unzip-6.0-1 Checking for suggested prerequisites... FOUND: perl-5.10.1 FOUND: sysstat FOUND: sqlite ###ERROR### One or more prerequisite packages are missing. Please install them before running this installer. Installation cancelled.
Ctrl+C退出安装,yum安装缺失的包nc libaio unzip
# yum -y install nc libaio unzip
再次运行安装脚本:
[root@mail zcs-8.6.0_GA_1153.RHEL6_64.20141215151155]# ./install.sh Operations logged to /tmp/install.log.1575 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: nc-1.84-22 FOUND: sudo-1.8.6p3-15 FOUND: libidn-1.18-2 FOUND: gmp-4.3.1-7 FOUND: libaio-0.3.107-10 FOUND: libstdc++-4.4.7-11 FOUND: unzip-6.0-2 Checking for suggested prerequisites... FOUND: perl-5.10.1 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 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 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.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-ldap......zimbra-ldap-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-logger......zimbra-logger-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-mta......zimbra-mta-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-dnscache......zimbra-dnscache-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-snmp......zimbra-snmp-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-store......zimbra-store-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-apache......zimbra-apache-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-spell......zimbra-spell-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-memcached......zimbra-memcached-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done zimbra-proxy......zimbra-proxy-8.6.0_GA_1153.RHEL6_64-20141215151155.x86_64.rpm...done Operations logged to /tmp/zmsetup07282015-135443.log Installing LDAP configuration database...done. Setting defaults... DNS ERROR resolving MX for mail.corp.net It is suggested that the domain name have an MX record configured in DNS Change domain name? [Yes] yes Create domain: [mail.corp.net] corp.net MX: mail.corp.net (192.168.0.240) Interface: 192.168.0.240 Interface: 127.0.0.1 Interface: ::1 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@corp.net ******* +Admin Password UNSET +Anti-virus quarantine user: virus-quarantine.zjw4edgp@corp.net +Enable automated spam training: yes +Spam training user: spam.esltmqcu@corp.net +Non-spam(Ham) training user: ham.tjpi5o5qf@corp.net +SMTP host: mail.corp.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.corp.net:7780/aspell.php +Enable version update checks: TRUE +Enable version update notifications: TRUE +Version update notification email: admin@corp.net +Version update source email: admin@corp.net +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: admin@corp.net ** 4) Admin Password UNSET 5) Anti-virus quarantine user: virus-quarantine.zjw4edgp@corp.net 6) Enable automated spam training: yes 7) Spam training user: spam.esltmqcu@corp.net 8) Non-spam(Ham) training user: ham.tjpi5o5qf@corp.net 9) SMTP host: mail.corp.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.corp.net:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@corp.net 22) Version update source email: admin@corp.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@corp.net (min 6 characters): [RxKIO9HeN] admin123 //设置管理员admin的密码 Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@corp.net 4) Admin Password set 5) Anti-virus quarantine user: virus-quarantine.zjw4edgp@corp.net 6) Enable automated spam training: yes 7) Spam training user: spam.esltmqcu@corp.net 8) Non-spam(Ham) training user: ham.tjpi5o5qf@corp.net 9) SMTP host: mail.corp.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.corp.net:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@corp.net 22) Version update source email: admin@corp.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) 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.11407] Saving config in /opt/zimbra/config.11407...done. The system will be modified - continue? [No] yes Operations logged to /tmp/zmsetup07282015-135443.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.corp.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.corp.net...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.corp.net...done. Adding mail.corp.net to zimbraMailHostPool in default COS...done. Creating domain corp.net...done. Setting default domain name...done. Creating domain corp.net...already exists. Creating admin account admin@corp.net...done. Creating root alias...done. Creating postmaster alias...done. Creating user spam.esltmqcu@corp.net...done. Creating user ham.tjpi5o5qf@corp.net...done. Creating user virus-quarantine.zjw4edgp@corp.net...done. Setting spam training and Anti-virus quarantine accounts...done. Initializing store sql database...done. Setting zimbraSmtpHostname for mail.corp.net...done. Configuring SNMP...done. Setting up syslog.conf...done. Starting servers...done. Installing common zimlets... com_zimbra_webex...done. com_zimbra_phone...done. com_zimbra_ymemoticons...done. com_zimbra_attachcontacts...done. com_zimbra_clientuploader...done. com_zimbra_linkedinimage...done. com_zimbra_proxy_config...done. com_zimbra_tooltip...done. com_zimbra_viewmail...done. com_zimbra_attachmail...done. com_zimbra_mailarchive...done. com_zimbra_adminversioncheck...done. com_zimbra_cert_manager...done. com_zimbra_date...done. com_zimbra_bulkprovision...done. com_zimbra_url...done. com_zimbra_email...done. com_zimbra_srchhighlighter...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_RHEL6_64) The ADMIN EMAIL ADDRESS created (admin@corp.net) Notify Zimbra of your installation? [Yes] No Setting up zimbra crontab...done. Moving /tmp/zmsetup07282015-135443.log to /opt/zimbra/log Configuration complete - press return to exit [root@mail zcs-8.6.0_GA_1153.RHEL6_64.20141215151155]#
至此,Zimbra8.6.0安装完成。
管理:
WebMail登录地址:https://mail.corp.net 或 https://192.168.0.240
WebAdmin管理地址:https://mail.corp.net:7071 或 https://192.168.0.240:7071
uninstall卸载
登陆root用户
1) 执行以下面的命令,su切换 到zimbra用户,停止zmcontrol服务,然后再退出zimbra帐户
su – zimbra
zmcontrol stop
exit
(you should be root after you run exit)
2a) 执行下面的命令,查看系统中是否还有zimbra进程
ps -ef | grep -i zimbra
如果看到还有zimbra进程,就用下面的命令,kill掉进程
2b) 用kill -9强制杀死进程:
kill -9 <zimbra的进程号>
3a) 执行以下命令:
df
如果你能看到 “amavisd”
3b) 那就执行以下命令:
umount /opt/zimbra/amavisd<-new-blah>/tmp
4) 进入你安装时解压出来的源文件目录(即安装文件目录)
cd /<tmp_tar_install_dir>/zcs/
tmp_tar_install_dir:你的文件路径,如我所下载来的安装包,都是放在/usr/local/src下面的,然后把安装包改名成zcs,这个你应该明白吧?不明白?可联系我
cd /usr/local/src/zcs/
[root@linuxyw zcs]# ls
README.txt data install.sh readme_binary_en_US.txt util
bin docs packages readme_source_en_US.txt
[root@linuxyw zcs]# pwd
/usr/local/src/zcs
5)执行以下命令:
./install.sh -u
6)执行以下的命令完成卸载
rm -rf /opt/zimbra
rm -rf /var/log/*zimbra*
rm -rf /tmp/*zimbra*
rm -rf /tmp/hsperfdata*
rm -rf /tmp/install.*
rm -rf /tmp/*swatch*
rm -rf /tmp/log*
进以下面的目录中,查看下,确保所有用户拥用者zimbra的文件全部删除
/var/log/
/tmp/
7)执行以下命令,删除zimbra用户和组:
userdel zimbra
userdel postfix
groupdel zimbra
groupdel postfix
8)在 /etc/fstab中删除这行内容(如果没有这行就跳过吧):
/dev/shm /opt/zimbra/amavisd-new-2.4.1/tmp tmpfs defaults,users,size=150m,mode=777 0 0
9) 在/etc/syslog.conf中删除以下几行,一般在文件最后的位置(如果你是用centos6.x系统,文件名应该/etc/rsyslog.conf
local0.* -/var/log/zimbra.log
auth.* -/var/log/zimbra.log
mail.* -/var/log/zimbra.log
10) 执行以下命令,删除日志配置文件(CentOS, RHEL)
rm -f /etc/logrotate.d/zimbra
11) 在 /etc/prelink.conf文件中删除以下内容 (CentOS, RHEL)
# added for Zimbra
-l /opt/zimbra/lib
-l /opt/zimbra/sleepycat/lib
-l /opt/zimbra/openldap/lib
-l /opt/zimbra/cyrus-sasl/lib
-l /opt/zimbra/mysql/lib
12) 在/etc/rc* 中删除zimbra自启动(CentOS, RHEL)
chkconfig –del zimbra
到此就完成Zimbra卸载了
原文链接:CentOS 6.5安装Zimbra 8.6.0 邮件系统详细步骤和缷载,转载请注明来源!