通过配置本地yum源可以加快局域网内rhel服务器包管理效率以及节约外网带宽资源,最近整理了下配置的步骤,记录以备忘。
1. 服务器配置需要的rpm包
createrepo-0.4.11-3.el5
yum-3.2.22-37.el5
2. 上传安装镜像
3. 挂载镜像以及拷贝到服务器上
mount -o loop /data1/iso/RHEL-57-X86_64_KS_20110815.iso /data1/rhel57
mkdir /data1/rhel/5Server
cp /data1/rhel57/* /data1/rhel/5Server/
4. createrepo -d /data1/rhel/5Server
5. 配置发布源,将目录/data1/rhel/5Server/发布到局域网,apache配置示例如下:
Alias /rhel /data1/rhel
Options Indexes
AllowOverride AuthConfig Options
Order allow,deny
Allow from all
6. 客户端配置
修改配置/etc/yum.repos.d/rhel-source.repo如下:
[rhel-source]
name=Red Hat Enterprise Linux $releasever - Source
baseurl=
enabled=1
gpgcheck=0
gpgkey=/RPM-GPG-KEY-redhat-release
其中10.109.5.20为配置的yum发布源
阅读(222) | 评论(0) | 转发(0) |