YUM服务器架设 服务器 192.168.0.245 配置yum服务器 先配置好http server,将光盘中的所有文件拷贝到/opt/yumsrc目录下 做仓库:

createrepo -g /opt/yumsrc/Cluster/repodata/comps-rhel5-cluster.xml /opt/yumsrc/Cluster
createrepo -g /opt/yumsrc/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /opt/yumsrc/ClusterStorage/
createrepo -g /opt/yumsrc/VT/repodata/comps-rhel5-vt.xml /opt/yumsrc/VT/
createrepo -g /opt/yumsrc/Server/repodata/comps-rhel5-server-core.xml /opt/yumsrc/Server/

客户端配置:

yum clean all
vi /etc/yum.repos.d/rhel-server.repo



[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
baseurl=http://192.168.0.245/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage
baseurl=http://192.168.0.245/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Server
baseurl=http://192.168.0.245/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
baseurl=http://192.168.0.245/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release