Replace the yum source of the rhel5 system

Source: Internet
Author: User
Error message: ThissystemisnotregisteredwithRHN solution: the reason is that your linux is not registered on the Red Hat Network, so you cannot download the software package. you can use centos as an alternative. Operation Method: 1. uninstall the default yum package installed by rhel to view the yum package rpm-qa | rpm-qa for grepyum uninstallation | grepyum

Error message:

This system is not registered with RHN

Solution:

The reason is that your linux is not registered on the RedHat network, so you cannot download the software package above,

Alternative solutions can be usedCentos.

Operation method:

1. uninstall the default yum package installed by rhel

View yum package

Rpm-qa | grep yum

Detach

Rpm-qa | grep yum | xargs rpm-e -- nodeps

2. download the new yum package

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-3.2.22-33.el5.centos.noarch.rpm

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm

Wgethttp: // response

[Root @ yxf install] # rpm-ivh yum-3.2.22-33.el5.centos.noarch.rpmyum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm

Warning: yum-3.2.22-33.el5.centos.noarch.rpm: Header V3 DSAsignature: NOKEY, key ID e8562897

Preparing... ######################################## ### [100%]

1: yum-fastestmirror ##################################### ###### [50%]

2: yum ####################################### #### [100%]

[Root @ yxf install] # rpm-ivhyum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

Warning: yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm: HeaderV3 DSA signature: NOKEY, key ID e8562897

Preparing... ######################################## ### [100%]

Package yum-metadata-parser-1.1.2-3.el5.centos is alreadyinstalled

Note: yum and yum-fastestmirror are mutually dependent, so install them at the same time.

3. download the configuration source of yum

Download the wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo to the/etc/yum. repos. d/Directory

[Root @ yxf yum. repos. d] # wgethttp: // docs.linuxtone.org/soft/lemp/centos-base.repo--:48:24 -- http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

Parsing host docs.linuxtone.org... 119.57.20.28

Connecting to docs.linuxtone.org | 119.57.20.28 |: 80... connected.

An HTTP request has been sent and is waiting for response... 200 OK

Length: 1426 (1.4 K) [application/octet-stream]

Saving to: 'centos-Base. repo'

100% [============================================== ==>] 1,426 --. -K/s in 0 s

11:48:24 (77.4 MB/s)-'centos-Base. repo' saved [1426/1426]

4. run yum makecache to generate cache

[Root @ yxf yum. repos. d] # yum makecache

Loaded plugins: fastestmirror

Determining fastest mirrors

Addons 100% | =============================| 951 B

Addons/filelists 100% | =========================| 195 B

Addons/other 100% | =========================| 190 B

Addons/primary 100% | =========================| 202 B

Base 100% | =================================| 1.1 kB

Base/filelists 100% | ===========================| 2.9 MB

Base/other 100% | ===========================| 9.6 MB

Base/group 100% | =============================| 930 kB

Base/primary 100% | ===========================| 954 kB

Extras 100% | =============================| 2.1 kB

Extras/filelists_db 100% |=================================| 197 kB

Extras/other_db 100% | =========================| 437 kB

Extras/group 100% | =========================| 9.7 kB

Extras/primary_db 100% | =========================| 183 kB

Update 100% | =======================| 1.9 kB

Update/filelists_db 100% |===============================| 2.5 MB

Update/other_db 100% | =========================| 8.2 MB

Update/primary_db 100% | =========================| 580 kB

Base 2683/2683

Base 2683/2683

Base 2683/2683

Metadata Cache Created

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.