建立本地端的 yum repository
2013-07-03 15:48
將光碟片中的檔案都 copy 到 /rhel5 下
[root@node2 ~]# cd /media/RHEL_5.6\ x86_64\ DVD/
[root@node2 RHEL_5.6 x86_64 DVD]# cp -r * /rhel5/
編輯 /etc/yum.repos.d/rhel-debuginfo.repo 檔案
[root@node1 /]# vi /etc/yum.repos.d/rhel-debuginfo.repo
在最下面加入
[Server]
name=RHEL $releasever-$basearch CDROM
baseurl=file:///rhel5/Server
enabled=1
gpgchechk=1
gpgkey=file:///rhel5/RPM-GPG-KEY-redhat-release
[Cluster]
name=RHEL $releasever-$basearch CDROM
baseurl=file:///rhel5/Cluster
enabled=1
gpgchechk=1
gpgkey=file:///rhel5/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=RHEL $releasever-$basearch CDROM
baseurl=file:///rhel5/ClusterStorage
enabled=1
gpgchechk=1
gpgkey=file:///rhel5/RPM-GPG-KEY-redhat-release
[VT]
name=RHEL $releasever-$basearch CDROM
baseurl=file:///rhel5/VT
enabled=1
gpgchechk=1
gpgkey=file:///rhel5/RPM-GPG-KEY-redhat-release
輸入 yum list 看結果,如果有以下畫面即代表成功。
[root@node2 ~]# yum list
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Cluster | 1.3 kB 00:00
Cluster/primary | 6.2 kB 00:00
Cluster 32/32
ClusterStorage | 1.3 kB 00:00
ClusterStorage/primary | 8.3 kB 00:00
ClusterStorage 39/39
Server | 1.3 kB 00:00
Server/primary | 905 kB 00:00
Server 3229/3229
VT | 1.3 kB 00:00
VT/primary | 18 kB 00:00
VT 57/57
Installed Packages