RHEL configure Centos yum Source

Source: Internet
Author: User

RHEL configure Centos yum Source

Because RHEL's yum online update is charged, it cannot be used if it is not registered, that is, it cannot install software online. In this case, if we use a machine to install the RHEL system, it will be very complicated to mount the local disc first after each software installation, and some software is also of the old version, in this case, we can use the CentOS YUM source to meet our needs.


1. Delete the original YUM of RHEL.

rpm-aq| grep yum| xargs rpm-e--nodeps

Ii. Download The CentOS yum installation package (source 163)

wgethttp: //mirrors .163.com /centos/5/os/x86_64/CentOS/yum-3 .2.22-40.el5.centos.noarch.rpm wgethttp: //mirrors .163.com /centos/5/os/x86_64/CentOS/yum-fastestmirror-1 .1.16-21.el5.centos.noarch.rpm wgethttp: //mirrors .163.com /centos/5/os/x86_64/CentOS/yum-metadata-parser-1 .1.2-4.el5.x86_64.rpm wgethttp: //mirrors .163.com /centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5

3. Install CentOS YUM installation package
Yum and yum-plugin-fastestmirror need to be installed together, the two packages have dependencies, separate installation will fail, before the installation first import the RPM-GPG-KEY into the system, otherwise there will be a warning

rpm-ivhyum-metadata-parser-1.1.2-4.el5.x86_64.rpm rpm-- import RPM-GPG-KEY-CentOS-5 rpm–ivhyum-3.2.22-40.el5.centos.noarch.rpmyum-fastestmirror-1.1.16-21.el5.centos.noarch. rm

Now we can use yum online.

4. Modify yum Source
To use online Yum to install software faster, we can use domestic Netease Yum sources or other domestic yum sources

5. Change yum source # Use the CentOS image source of Netease

cd /etc/yum .repos.d/ vi rhel-debuginfo.repo #CentOS-Base.repo # #ThemirrorsystemusestheconnectingIPaddressoftheclientandthe #updatestatusofeachmirrortopickmirrorsthatareupdatedtoand #geographicallyclosetotheclient.YoushouldusethisforCentOSupdates #unlessyouaremanuallypickingothermirrors. # #Ifthemirrorlist=doesnotworkforyou,asafallbackyoucantrythe #remarkedoutbaseurl=lineinstead. # # [base] name=CentOS-5-Base-163.com mirrorlist=http: //mirrorlist .centos.org/?release=5&arch=$basearch&repo=os baseurl=http: //mirrors .163.com /centos/5/os/ $basearch/ gpgcheck=1 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #releasedupdates [updates] name=CentOS-5-Updates-163.com mirrorlist=http: //mirrorlist .centos.org/?release=5&arch=$basearch&repo=updates baseurl=http: //mirrors .163.com /centos/5/updates/ $basearch/ gpgcheck=1 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #packagesused/producedinthebuildbutnotreleased [addons] name=CentOS-5-Addons-163.com mirrorlist=http: //mirrorlist .centos.org/?release=5&arch=$basearch&repo=addons baseurl=http: //mirrors .163.com /centos/5/addons/ $basearch/ gpgcheck=1 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additionalpackagesthatmaybeuseful [extras] name=CentOS-5-Extras-163.com mirrorlist=http: //mirrorlist .centos.org/?release=5&arch=$basearch&repo=extras baseurl=http: //mirrors .163.com /centos/5/extras/ $basearch/ gpgcheck=1 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additionalpackagesthatextendfunctionalityofexistingpackages [centosplus] name=CentOS-5-Plus-163.com mirrorlist=http: //mirrorlist .centos.org/?release=5&arch=$basearch&repo=centosplus baseurl=http: //mirrors .163.com /centos/5/centosplus/ $basearch/ gpgcheck=1 enabled=0 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #contrib-packagesbyCentosUsers [contrib] name=CentOS-5-Contrib-163.com mirrorlist=http: //mirrorlist .centos.org/?release=5&arch=$basearch&repo=contrib baseurl=http: //mirrors .163.com /centos/5/contrib/ $basearch/ gpgcheck=1 enabled=0 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Vi. Cleanup

yumcleanall yummakecache

VII. Update

yumupdate

Blog reference: http://pvbutler.blog.51cto.com/7662323/1320908

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.