CentOS6.5下安装iRedMail中需要解决的问题
iRedMail是个专门用于Redhat/CentOS下的企业Mail服务集成安装软件包,本来只要有干净的系统就可以轻松安装,无奈国内网络状况和墙头众多,安装中也有很多问题需要解决,下面记录的都是我安装之中所遇到问题,特记录下来备忘。
一、安装
1,首先要替换系统的yum源到国内的镜像源,否则用yum安装软件太痛苦了,我用的是163的yum源服务,参见CentOS YUM 国内镜像 。
2,不要安装php,apache之类的软件,保持系统尽量干净,iRedMail安装过程中会自动下载并安装所需软件包,否则版本不对还造成麻烦,辛辛苦苦的设置也会被覆盖掉!
3,iRedMail.org不明原因被墙,幸亏有了国内镜像服务,所以要访问iredmail.com下载安装包。
4,iRedMail安装包解开后,pkgs/get_all.sh这个脚本中都是指向iredmail.org,使用编辑器全部替换为iredmail.com。然后在执行这个脚本。
5,执行主目录下的iRedMail.sh时,根据我的经验不可能一次执行成功,主要有三个问题引起:
1)访问国外网站不够快,造成超时报错,重复执行脚本即可,安装脚本会从上次断点开始执行(万幸有此功能!)
2)脚本执行中可能回报YUM BaseUrl之类的错误,需要编辑/etc/yum.repos.d/CentOS_Base.repo,将文件里面的“$releasever”全部替换为“6”。(注:不包括引号,6就是系统的主版本)
[root@mail2 iRedMail-0.8.7]# cat /etc/yum.repos.d/CentOS-Base.repo # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base - 163.com baseurl=http://mirrors.163.com/centos/6/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #gpgcheck=1 #gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 # ##released updates #[updates] #name=CentOS-$releasever - Updates - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/ ##mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #gpgcheck=1 #gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 # ##additional packages that may be useful #[extras] #name=CentOS-$releasever - Extras - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/ ##mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #gpgcheck=1 #gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 # ##additional packages that extend functionality of existing packages #[centosplus] #name=CentOS-$releasever - Plus - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/ ##mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #gpgcheck=1 #enabled=0 #gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 # ##contrib - packages by Centos Users #[contrib] #name=CentOS-$releasever - Contrib - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/ ##mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #gpgcheck=1 #enabled=0 #gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
3)iRedMail.sh脚本还会安装一个epel.repo,里面启用了几个镜像列表设置,这可能也会导致报错,打开此文件,取消baseurl前面的注释,然后注释掉mirrorlist这一行。
[root@mail2 iRedMail-0.8.7]# cat /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 6 - $basearch baseurl=http://mirrors.163.com/centos/6/os/$basearch/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 gpgcheck=0
二、其他
1,roundcube webmail 左上角logo替换,在/var/www/roundcubemail-v.v.v/skins/xxx/includes/header.html
2,iredadmin可以管理多个域名,配合域名解析和mx记录设置即可。