手机版
你好,游客 登录 注册
背景:
阅读新闻

LAMP平台下构建Postfix邮件服务器

[日期:2012-06-01] 来源:Linux社区  作者:chenkui [字体: ]

前言:

本人之前已经做过这个实验,只是版本不同,今天本来想用全新版本的源码包做实验,但是以httpd-2.4.2.tar.gz的源码包在配置虚拟主机这一块我不知道如何配置,按照以前的配置总是报错:AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache2/conf/httpd.conf:491,在此纠结了很久,最终未果,就换了httpd-2.2.9的源码包做的实验,一路下来偶尔出点小插曲,但都解决了,下面是我在虚拟机上的配置过程:

先把我实验的包大概说一下:

下面是实验过程
[root@mail ~]# uname -a           //检查系统环境
Linux mail 2.6.18-238.el5 #1 SMP Sun Dec 19 14:24:47 EST 2010 i686 i686 i386 GNU/Linux
[root@mail ~]#
[root@mail ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost localhost.localdomain
192.168.10.170          mail.chenkui.com      //添加主机解析记录
::1             localhost6.localdomain6 localhost6
[root@mail ~]#
[root@mail ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=mail   修改主机名
GATEWAY=192.168.10.1
[root@mail ~]#  init 6 //在此修改主机名要重启才能生效


构建本地DVD yum源

安装createrepo软件包//在系统光盘中自带有此软件包
手动挂载光驱:mount /dev/cdrom /mnt Or /dev/dhc /mnt  这个时候,进入/mnt就可以看到光盘上的文件了
[root@www ~]# rpm -ivh /mnt/Server/createrepo-0.4.11-3.el5.noarch.rpm
warning: /mnt/Server/createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:createrepo             ########################################### [100%]
[root@www ~]#

然后修改/etc/yum.repos.d/rhel-debuginfo.repo,把里面的内容修改成如下:

[root@mail mnt]# vi /etc/yum.repos.d/rhel-debuginfo.repo

[Cluster]
enabled = 1     //1表示repo中定义的源是启用的,0为禁用
name = Cluster  //目录名称可自定义,在此我就把它定义为光盘中软件的目录名称
baseurl = file:///mnt/Cluster  //把光盘挂载在哪个目录下面,此处就定义哪个目录
gpgcheck = 0   //表示这个repo中下载的rpm将进行gpg的校验,已确定rpm包的来源是有效和安全的,一般在此不启用
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release//定义用于校验的gpg密钥,当不启用的时候可以不定义该

url
[Server]
enabled = 1
name = Server
baseurl = file:///mnt/Server
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
enabled = 1
name = ClusterStorage
baseurl = file:///mnt/ClusterStorage
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
enabled = 1
name = VT
baseurl = file:///mnt/VT
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

保存退出

linux
相关资讯       Postfix  LAMP配置  Postfix安装 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款