所需软件
Client:
yum-3.0.1-5.el5
yum-metadata-parser-1.0-8.fc6
Yum Server:
yum-3.0.1-5.el5
yum-metadata-parser-1.0-8.fc6
yum-rhn-plugin-0.4.3-1.el5
yum-updatesd-3.0.1-5.el5
createrepo-0.4.4-2.fc6.noarch.rpm
yum-arch-2.2.2-2.fc7.noarch.rpm(ftp://rpmfind.net/linux/)
配置
Server:
1.
[root@ns100 vmware]# mount -o loop 5.0-i386.iso /mnt
[root@ns100 vmware]# mkdir /rhel5
[root@ns100 vmware]# cp -R /mnt/Server /rhel5
[root@ns100 vmware]# cp /mnt/RPM-GPG-KEY-redhat-release /rhel5/Server
2.
[root@ns100 vmware]# yum-arch /rhel5/Server
[root@ns100 vmware]# createrepo /rhel5/Server
3.
[root@ns100 vmware]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
[Server]
gpgkey=
baseurl=
4.
[root@ns100 vmware]# server httpd start
Client:
[root@network yum.repos.d]# mkdir -p /etc/yum.repos.d/backup
[root@network yum.repos.d]# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup
[root@network yum.repos.d]# touch /etc/yum.repos.d/Server.repo
[root@network yum.repos.d]# cat /etc/yum.repos.d/Server.repo
[Server]
name=Red Hat
baseurl=/
gpgcheck=1
gpgkey=
测试
Client:
[root@network yum.repos.d]#yum install httpd
阅读(2685) | 评论(0) | 转发(0) |