RehatEnterpriseLinux5: configure the local yum source. The test is normal. Configure local yum source local source preferred use DVD Mount Disk 1. Mount the image mount-tiso9660/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: [C
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) "
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:
Configuration http://www.linuxidc.com/Linux/2013-08/88217.htm for local yum sources in RedHat Linux
RedHat 6.2 Linux modify yum source free use CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm
Configure epel yum source http://www.linuxidc.com/Linux/2012-10/71850.htm
Redhat local yum source configuration http://www.linuxidc.com/Linux/2012-11/75127.htm
Yum profile description http://www.linuxidc.com/Linux/2013-04/83298.htm
Install yum http://www.linuxidc.com/Linux/2013-06/86535.htm in RedHat 6.1
YUM installation and cleaning http://www.linuxidc.com/Linux/2013-07/87163.htm
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10