1. First, attach the CD device-assign the optical drive-ChooseavirtualCD/DVDdiskfile and select the DVD image. Then, the image is automatically loaded to/media/RHEL_5.4x86_64DVD2 and/etc/yum. repos. d/dvd. repo, add the following content and save [base] name = Serverbaseurl = file: // media/RHEL_5.4 % 20x8
1. Attach a CD first
Device-assign optical drive-Choose a virtual CD/DVD disk file select a DVD image, then the image is automatically loaded
/Media/RHEL_5.4 x86_64 DVD
2. Create/etc/yum. repos. d/dvd. repo, add the following content, and save
[Base]
Name = Server
Baseurl = file: // media/RHEL_5.4 % 20x86_64% 20DVD/Server
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/RHEL_5.4 % 20x86_64% 20DVD/RPM-GPG-KEY-RedHat-release
Note: because the file path contains spaces, You need to convert it to % 20.
To install software packages related to cluster, clusterstorage, or xen, you only need to add the following content:
[VT]
Name = VT
Baseurl = file: // media/RHEL_5.4 % 20x86_64% 20DVD/VT
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/RHEL_5.4 % 20x86_64% 20DVD/RPM-GPG-KEY-redhat-release
[Cluster]
Name = Cluster
Baseurl = file: // media/RHEL_5.4 % 20x86_64% 20DVD/Cluster
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/RHEL_5.4 % 20x86_64% 20DVD/RPM-GPG-KEY-redhat-release
[CS]
Name = ClusterStorage
Baseurl = file: // media/RHEL_5.4 % 20x86_64% 20DVD/ClusterStorage
Enable = 1
Gpcheck = 1
Gpgkey = file: // media/RHEL_5.4 % 20x86_64% 20DVD/RPM-GPG-KEY-redhat-release
3. Clear the yum cache configuration to make the new path take effect.
- [Root @ localhost ~] # Yum clean all
- Loaded plugins: fastestmirror
- Cleaning up Everything
- Cleaning up list of fastest mirrors
Now that the configuration is complete, yum can be used. However, remember to load the CD or set it to automatically load when you start the system.