-
Copy the contents from the Red Hat Enterprise Linux DVD ISO RHELX-XXXX.iso the the destination web directory.
# mkdir -p /var/www/html/cdrom/
# mount -o loop RHELX-XXXX.iso /media
# cp -rv /media/* /var/www/html/cdrom
2 Create a file called dvd.repo locally with the contents below :
# cat /etc/yum.repos.d/cat.repo
[RHEL5-Server-DVD]
name=Red Hat Enterprise Linux $releasever - $basearch (DVD)
baseurl=file:///var/www/html/cdrom/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Verify from client
- # yum clean all
# yum repolist
Loaded plugins: katello, product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
RHEL5-Server-DVD | 1.5 kB 00:00
RHEL5-Server-DVD/primary | 920 kB 00:00
RHEL5-Server-DVD 3285/3285
repo id repo name status
RHEL5-Server-DVD Red Hat Enterprise Linux 5Server - x86_64 (DVD) 3,285
repolist: 3,285
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10670663/viewspace-765550/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10670663/viewspace-765550/