Rehat Enterprise Linux 5: configure the local yum source. The test is normal.
Configure local yum Source
First select a local source and use a DVD to install the disk.
1. Mount the image
Mount-t iso9660/dev/cdrom/media/
Command to mount the image to the/media/folder.
2. Edit repository settings
Edit/etc/yum. repos. d/rhel-debuginfo.repo, delete the original content, add the following content:
[Cluster]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Cluster
Baseurl = file: // media/Cluster
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
[ClusterStorage]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-ClusterStorage
Baseurl = file: // media/ClusterStorage
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Server]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Server
Baseurl = file: // media/Server
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-VT
Baseurl = file: // media/VT
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releas
3. Modify yum code
Modify/usr/lib/python2.4/site-packages/yum/yumRepo. py
Find
Remote = url + '/' + relative
This line is changed to remote = '/media/Server' +'/'+ relative
4. Import the GPG key
# Rpm -- import/etc/pki/rpm-gpg/RPM *
If it is not imported, the following prompt will be displayed during the yum install package:
Downloading Packages:
Warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186
Importing GPG key 0x37017186 "Red Hat, Inc. (release key) <security@redhat.com>"
This is because the old version of GPG keys is installed in yum.
After completing the preceding settings, you can use local resources to install the required packages for yum.
Recommended reading:
RedHat Linux local yum source configuration
RedHat 6.2 modify yum source in Linux use CentOS source for free
Configure the epel yum Source
Redhat local yum source configuration
Description of yum configuration file
Install yum in RedHat 6.1)
YUM installation and cleaning