Rehat Enterprise Linux 5: configure the local yum Source

Source: Internet
Author: User
Tags gpg

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.