最近因为有商业使用上的需求,因此研究如何架设Opensource Zimbra。当然要架设Opensource Zimbra 就是要搭配免费的Linux系统,在此就选择了相容性与稳定性兼具的CentOS。
CentOS系统安装与设定
下载CentOS 6.0 64bit ISO档桉 (http://ftp.tc.edu.tw/Linux/CentOS/6/isos/x86_64/CentOS-6.0-x86_64-bin-DVD1.iso)
烧录光碟 (若使用VMWare,则复制到伺服器后,选择光碟机并指向该ISO档桉)
安装 CentOS 6.0
安装过程中,可选择硬碟partition分割为: BOOT/100MB,SWAP/4000MB,其余的空间设定LVM并分割给 /。
选择安装为 Basic Server。
安装完成后重开机。
以root帐号登入。
设定网卡IP[root@mail ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0″HWADDR="09:00:26:70:84:BE"NM_CONTROLLED="no"ONBOOT="yes"
BOOTPROTO=none
IPADDR=192.168.32.156
NETMASK=255.255.255.0
GATEWAY=192.168.32.254
DNS 伺服器的 IP 设定[root@mail ~]# vi /etc/resolv.confnameserver 127.0.0.1nameserver 168.95.1.1
设定 network 档桉[root@mail ~]# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=mail.domainname.com
设定 network 档桉[root@mail ~]# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=mail.domainname.com
设定 hosts 档桉[root@mail ~]# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.32.156 mail.domainname.com mail
停用SELinux[root@mail ~]# vi /etc/selinux/config
SELINUX=diabledSELINUXTYPE=targeted
停用iptables / ip6tables[root@mail ~]# chkconfig iptables off
[root@mail ~]# chkconfig ip6tables off
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.32.156 mail.domainname.com mail
停用SELinux[root@mail ~]# vi /etc/selinux/config
SELINUX=diabledSELINUXTYPE=targeted
停用iptables / ip6tables[root@mail ~]# chkconfig iptables off
[root@mail ~]# chkconfig ip6tables off
更新系统档桉[root@mail ~]# yum –y update
安装必要元件[root@mail ~]# yum install -y mysql sysstat perl sudo sqlite libstdc++-4.4.4-13.el6.i686 bind bind-chroot nc.x86_64
建立domainname.com档桉[root@mail ~]# vi /var/named/chroot/var/named/domainname.com
并写入以下内容:
;
; Addresses and other host information.
;
@ IN SOA domainname.com. admin.domainname.com. (
2011030801 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
IN NS ns.domainname.com.
IN A 192.168.32.156
IN MX 10 mail.domainname.com.mail IN A 192.168.32.156
ns IN A 192.168.32.156
并写入以下内容:
;
; Addresses and other host information.
;
@ IN SOA domainname.com. admin.domainname.com. (
2011030801 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
IN NS ns.domainname.com.
IN A 192.168.32.156
IN MX 10 mail.domainname.com.mail IN A 192.168.32.156
ns IN A 192.168.32.156
修改 named.conf 档桉[root@mail ~]# vi /var/named/chroot/etc/named.conf
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";statistics-file "/var/named/data/named_stats.txt";
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";statistics-file "/var/named/data/named_stats.txt";
forwarders { 127.0.0.1; };
};
include "/etc/rndc.key";
// We are the master server for mydomain.com
zone "domainname.com" {
type master;
file "domainname.com";
};
启用 DNS 服务[root@mail ~]# /etc/init.d/named start
启用 DNS 自动启动[root@mail ~]# chkconfig named on
确认 DNS 正确运作中[root@mail ~]# host -t mx domainname.comdomainname.com mail is handled by 10 mail.domainname.com.[root@mail ~]# nslookup mail.domainname.comServer: 127.0.0.1
Address: 127.0.0.1#53
Address: 127.0.0.1#53
Name: mail.domainname.com
Address: 192.168.32.156
修改tty 设定[root@mail ~]# vi /etc/sudoers#Defaults requiretty
Zimbra 7.1.3 Opensource 系统安装
Zimbra 7.1.3 Opensource 系统安装
下载 Zimbra 7.1.3 Opensource[root@mail ~]# mkdir /download
[root@mail ~]# cd /download
[root@mail ~]# cd /download
[root@mail ~]# wget http://files.zimbra.com/downloads/7.1.3_GA/zcs-7.1.3_GA_3346.RHEL6_64.20110928134428.tgz
解压缩 Zimbra 7.1.3 Opensource[root@mail ~]# tar -zxvf zcs-7.1.3_GA_3346.RHEL6_64.20110928134428.tgz
安装 Zimbra 7.1.3 Opensource[root@mail ~]# cd zcs-7.1.3_GA_3346.RHEL6_64.20110928134428
[root@mail ~]# ./install.sh –platform-override
[root@mail ~]# ./install.sh –platform-override
安装过程将会出现精灵式问答,请依照粗体字给予回应:If you leave the question in blank, it will select the default option.Do you agree with the terms of the software license agreement? [N] y
下列安装项目直接按ENTER即可。
下列安装项目直接按ENTER即可。
Select the packages to install
Install zimbra-ldap [Y]
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-memcached [N]
Install zimbra-proxy [N]You appear to be installing packages on a platform different
than the platform for which they were built.
Install zimbra-ldap [Y]
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-memcached [N]
Install zimbra-proxy [N]You appear to be installing packages on a platform different
than the platform for which they were built.
This platform is UNKNOWN
Packages found: RHEL5_64
This may or may not work.
Packages found: RHEL5_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.
may result in an installation that is NOT usable. Your support
options may be limited if you choose to continue.
Install anyway? [N] y
The system will be modified. Continue? [N] y
The system will be modified. Continue? [N] y
当Zimbra 安装完成后,会出现系统设定清单,这时,选择3,然后4来设定admin的密码。
输入密码完成后,选择r,然后a来储存设定。
最后安装精灵会询问是否通知Zimbra,输入no。Notify Zimbra of your installation? [Yes] no
输入密码完成后,选择r,然后a来储存设定。
最后安装精灵会询问是否通知Zimbra,输入no。Notify Zimbra of your installation? [Yes] no
其他资讯:
登入系统管理画面https://mail.domainname.com:7071
或
登入系统管理画面https://mail.domainname.com:7071
或
https://192.168.32.156:7071
如果忘记admin密码需要重设,则:[root@mail ~]# su – zimbra
[zimbra@mail ~]# zmprov sp <admin email address> <new password>
[zimbra@mail ~]# zmprov sp <admin email address> <new password>
移除 Zimbra[root@mail ~]# cd /downloads
[root@mail ~]# ./install.sh –u
[root@mail ~]# cd /opt
[root@mail ~]# rm –rf zimbra
[root@mail ~]# ./install.sh –u
[root@mail ~]# cd /opt
[root@mail ~]# rm –rf zimbra