In simple cases, this method is only applicable to the rhel5 DVD disc as the local yum source. 1. Create a mount point and mount the rhel5 DVD: # mkdir/media/cdrom # mount/dev/cdrom/media/cdrom if you have a rhel5 DVD image, replace the following command with the second command above: # mount-oloop-tiso9660/path//
In simple cases, this method is only applicable to the rhel5 DVD disc as the local yum source.
1. Create a mount point and mount the rhel5 DVD:
# Mkdir/media/cdrom
# Mount/dev/cdrom/media/cdrom
If you have a DVD image of rhel5, replace the following command with the second command:
# Mount-o loop-t iso9660/path/to/your_iso/media/cdrom
2. Make sure that the following software package has been installed in the system (your version may be different). If it is missing, install it on your own.
# Rpm-qa | grep yum
Yum-3.2.19-18.el5
Yum-security-1.1.16-13.el5
Yum-updatesd-0.9-2.el5
Yum-rhn-plugin-0.5.3-30.el5
Yum-metadata-parser-1.1.2-2.el5
3. edit/etc/yum. repos. d/rhel-debuginfo.repo and add the following content
[Base]
Name = Server Local Sources
Baseurl = file: // media/cdrom/Server
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/cdrom/RPM-GPG-KEY-RedHat-release
If you want to install software packages related to cluster, clusterstorage, or xen based on this, you only need to add the following:
[VT]
Name = VT Local Sources
Baseurl = file: // media/cdrom/VT
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/cdrom/RPM-GPG-KEY-redhat-release
[Cluster]
Name = Cluster Local Sources
Baseurl = file: // media/cdrom/Cluster
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/cdrom/RPM-GPG-KEY-redhat-release
[CS]
Name = ClusterStorage Local Sources
Baseurl = file: // media/cdrom/ClusterStorage
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/cdrom/RPM-GPG-KEY-redhat-release
Of course, the preceding three sections can be used separately in combination with the [base] section. For example, if you only need to install the Xen rpm package, you only need to add [VT] segments and [base] segments.
4. Example
Run the following command to install the rpm package related to the Xen virtual machine:
# Yum install xen kernel-xen virt-manager