2014-03-20
一.邮件服务器
1.邮件传输所需组件及相关协议
MDA:邮件传送代理人
MTA:邮件发送代理人,postfix,sendmail,qmail,使用smtp协议(tcp 25)
MUA:邮件用户代理人,foxmail,thunderbird,使用pop3(110),imap(143)协议来接收邮件。
2.mta服务器用postfix来实现
3.zimbra卸载
[root@mail zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ./install.sh -u
//默认安装目录
[root@mail zimbra]# /opt/zimbra
二.zimbra
1.网络规划
dns server:10.10.54.54
mail server:10.10.54.50(/opt >= 5GB)
2.配置DNS
[root@xiao54 ~]# vim /etc/named.conf
========================================
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "xiaoq.com" IN {
type master;
file "mail.xiaoq.com";
};
====================================
[root@xiao54 ~]# vim /var/named/mail.xiaoq.com
==============================================
$TTL 86400
@ IN SOA xiaoq.com. root (2014032001 1H 15M 1W 1D)
@ IN NS xiaoq.com.
@ IN MX 10 mail.xiaoq.com.
xiaoq.com. IN A 10.10.54.50
mail.xiaoq.com. IN A 10.10.54.50
www.xiaoq.com. IN A 10.10.54.54
============================================
[root@xiao54 ~]# /etc/init.d/named restart
3.配置邮件服务器
[root@xiao50 ~]# vim /etc/resolv.conf
================================
nameserver 10.10.54.54
================================
[root@xiao50 ~]# vim /etc/hosts
=======================================
127.0.0.1 localhost.localdomain localhost
10.10.54.50 xiaoq.com mail
IP 完整的主机名 别名
=======================================
4.安装zimbra
1)解压
[root@xiao50 softs]# tar zxvf zcs-8.0.6_GA_5922.RHEL6_64.20131203103705.tgz
2)查看安装文件
##安装步骤
[root@xiao50 zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# vim README.txt
==========================
Installing from binary:
tar xzf zcs.tgz
cd zcs
./install.sh
=========================
##用法
[root@xiao50 zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ./install.sh --help
===================================================================
-c|--cluster type Cluster install type active|standby.
-h|--help Usage
-l|--license <file> License file to install.
-a|--activation <file> License activation file to install. [Upgrades only]
-r|--restore <file> Restore contents of <file> to localconfig
-s|--softwareonly Software only installation.
-u|--uninstall Uninstall ZCS
-x|--skipspacecheck Skip filesystem capacity checks.
--beta-support Allows installer to upgrade Network Edition Betas.
--platform-override Allows installer to continue on an unknown OS.
--skip-activation-check Allows installer to continue if license activation checks fail.
[defaultsfile] File containing default install values.
======================================================================
3)安装
[root@xiao50 zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ./install.sh
ERROR1:
Installation can not proceeed. Please fix your /etc/hosts file
##解决方法:hostname mail
Error2:MISSING nc sysstat
需要下载依赖包:yum install -y nc.x86_64 sysstat.x86_64
Error3:端口冲突
关闭服务:/etc/init.d/postfix stop
Error4: assertion '-r /opt/zimbra/conf/my.cnf' failed
解决办法:
1、卸载#./install.sh -u
2、删除/etc/passwd中的zimbra和mysql用户
3、重新安装#./install.sh
4)安装过程需要修改的地方
Select the packages to install
Install zimbra-memcached [N] Y ----change
Install zimbra-proxy [N]
Checking required space for zimbra-core
Checking space for zimbra-store
Installing:
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-store
zimbra-apache
zimbra-spell
zimbra-memcached
The system will be modified. Continue? [N] Y ---change
修改管理员密码:
Admin Password UNSET
修改HTTP模式:
Web server mode: https
Web server mode: mixed
5.邮件管理
后台管理:https://mail.xiaoq.com:7071 或者https://10.10.54.50:7071
6.查看系统参数
可以通过zmlocalconfig -s命令查看系统的参数
$ postconf //查看postfix的所有配置
$ zmlocalconfig //查看各种组件的配置信息
$ zmlocalconfig -s|grep zimbra_ldap_userdn //查看zimbra帐号在LDAP中的DN
$ zmlocalconfig -s|zimbra_ldap_password //查看zimbra帐号在LDAP中的密码
$ zmlocalconfig -s|grep zimbra_mysql //查看mysql的配置信息
7.登录zimbra中mysql数据库(和之前装的mysql没有练习)
[root@xiao50 ~]# /opt/zimbra/bin/zmlocalconfig -uzimbra -pScwZtWEOhmMxK7ns067V0jfFHt42 -P7306 --socket=/opt/zimbra/db/mysql.sock
##查看密码
[root@mail ~]# /opt/zimbra/bin/zmlocalconfig -s |grep zimbra_mysql
zimbra_mysql_password = ScwZtWEOhmMxK7ns067V0jfFHt42
##登录通用
/opt/zimbra/mysql/bin/mysql -u`/opt/zimbra/bin/zmlocalconfig -s |grep "zimbra_mysql_user" | awk '{print $3}'` -p`/opt/zimbra/bin/zmlocalconfig -s |grep "zimbra_mysql_password" | awk '{print $3}'` -P7306 --sock=/opt/zimbra/db/mysql.sock