Set the YUM source of the RHEL6 system

Source: Internet
Author: User
Uninstall the YUM package that comes with RHEL6. Run the following command to check the YUM dependency. Rpm-qRyum gets dependency: [root @ bogondoc] # rpm-qRyum-3.2.27-14.el6.noarch/usr/bin/pythonconfig (yum) 3.2.27-14. el6pygpgmepython2.4python (

Uninstall the YUM package that comes with RHEL6.

Run the following command to check the YUM dependency.

Rpm-qR yum

The following dependencies are obtained:

[Root @ bogon doc] # rpm-qR yum-3.2.27-14.el6.noarch
/Usr/bin/python
Config (yum) = 3.2.27-14. el6
Pygpgme
Python >=2.4
Python (abi) = 2.6
Python-iniparse
Python-sqlite
Python-urlgrabber> = 3.9.0-8
Rpm> = 0: 4. 4.2
Rpm-python
Rpmlib (CompressedFileNames) <= 3.0.4-1
Rpmlib (FileDigests) <= 4.6.0-1
Rpmlib (PartialHardlinkSets) <= 4.0.4-1
Rpmlib (PayloadFilesHavePrefix) = 1.1.0
Rpmlib (PayloadIsXz) = 2.4
Python (abi) = 2.6
Python-iniparse
Python-sqlite
Python-urlgrabber> = 3.9.0-8
Rpm> = 0: 4. 4.2
Rpm-python
Rpmlib (CompressedFileNames) <= 3.0.4-1
Rpmlib (FileDigests) <= 4.6.0-1
Rpmlib (PartialHardlinkSets) <= 4.0.4-1
Rpmlib (PayloadFilesHavePrefix) = 1.1.0
Rpmlib (PayloadIsXz) <= 5.2-1

Use YUM to uninstall yourself.

Command:

Yum erase yum

The running result is:

[Root @ bogon doc] # yum erase yum
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package yum. noarch. 2.27-14. el6 set to be erased
--> Processing Dependency: yum> = 3.2.19-15 for package: yum-rhn-plugin-0.9.1-5.el6.noarch
--> Processing Dependency: yum> = 3.2.25-10 for package: yum-utils-1.1.26-11.el6.noarch
--> Running transaction check
---> Package yum-rhn-plugin.noarch. 9.1-5. el6 set to beerased
--> Processing Dependency: yum-rhn-plugin> = 0.5.3-30 forpackage: rhn-check-1.0.0-38.el6.noarch
---> Package yum-utils.noarch. 1.26-11. el6 set to beerased
--> Processing Dependency: yum-utils for package: abrt-addon-ccpp-1.1.13-4.el6.i686
--> Running transaction check
---> Package abrt-addon-ccpp.i686. 1.13-4. el6 set to beerased
--> Processing Dependency: abrt-addon-ccpp for package: abrt-cli-1.1.13-4.el6.i686
---> Package rhn-check.noarch. 0.0-38. el6 set to beerased
--> Processing Dependency: rhn-check> = 0.0.8 for package: rhnsd-4.9.3-2.el6.i686
--> Running transaction check
---> Package abrt-cli.i686. 1.13-4. el6 set to be erased
---> Package rhnsd. i686. 9.3-2. el6 set to be erased
--> Processing Dependency: rhnsd for package: rhn-setup-1.0.0-38.el6.noarch
--> Running transaction check
---> Package rhn-setup.noarch. 0.0-38. el6 set to beerased
--> Finished Dependency Resolution

Dependencies Resolved

========================================================== ========================================================== ======================
Package Arch Version Repository Size
========================================================== ========================================================== ======================
Removing:
Yum noarch 3.2.27-14.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 3.8 M
Removing for dependencies:
Abrt-addon-ccpp
I686 1.1.13-4.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 49 k
Abrt-cli i686 1.1.13-4.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 63 k
Rhn-check noarch 1.0.0-38.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 38 k
Rhn-setup noarch 1.0.0-38.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 190 k
Rhnsd i686 4.9.3-2.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 89 k
Yum-rhn-plugin
Noarch 0.9.1-5.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 174 k
Yum-utils noarch 1.1.26-11.el6@anaconda-RedHatEnterpriseLinux-201009221732.i386/6.0 239 k

Transaction Summary
========================================================== ========================================================== ======================
Remove 8 Package (s)
Reinstall 0 Package (s)
Downgrade 0 Package (s)

Is this OK [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing: abrt-cli-1.1.13-4.el6.i686 1/8
Erasing: rhn-check-1.0.0-38.el6.noarch 2/8
Erasing: yum-rhn-plugin-0.9.1-5.el6.noarch 3/8
Erasing: rhn-setup-1.0.0-38.el6.noarch 4/8
Erasing: rhnsd-4.9.3-2.el6.i686 5/8
Erasing: abrt-addon-ccpp-1.1.13-4.el6.i686 6/8
Erasing: yum-utils-1.1.26-11.el6.noarch 7/8
Erasing: yum-3.2.27-14.el6.noarch 8/8

Removed:
Yum. noarch. 2.27-14. el6

Dependency Removed:
Abrt-addon-ccpp.i686. 1.13-4. el6 abrt-cli.i686. 1.13-4. el6rhn-check.noarch. 0.0-38. el6 rhn-setup.noarch. 0.0-38. el6
Rhnsd. i686. 9.3-2. el6 yum-rhn-plugin.noarch. 9.1-5. el6yum-utils.noarch. 1.26-11. el6

Complete!

Reinstall the Centos YUM package.

Then reinstall the YUM package of Centos6.0.

The RPM packages required for YUM installation are:

Yum-3.2.27-14.el6.Centos. Noarch. rpm
Yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

The two RPM packages are:

Http://mirrors.163.com/centos/6/ OS /i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm

Http://mirrors.163.com/centos/6/ OS /i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

We recommend that you download two RPM packages to a separate folder. After the download is complete, install the two RPM packages.

Installation Command:

The time saving method is as follows:

Rpm-ivh *. rpm

The NB method is:

Rpm-ivh yum-3.2.27-14.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

Minor issues:

If you install the Centos YUM package directly and modify the YUM source, you will find that the Yum install file is abnormal and the following error is prompted:

Listen 14] HTTP Error 404: http://mirrors.163.com/centos/%24releasever/ OS /i386/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd. xml) forrepository: base. Please verify its path and try again

This is because the release version of RHEL has not been modified. To fix this problem, run the following command:

Rpm-e -- nodeps redhat-release-server-6Server-6.0.0.37.el6.i686redhat-indexhtml-6-1.el6.noarch

Download the Centos release and indexhtml packages and install them.

Wgethttp: // response
Wgethttp: // response

Install these two packages.

Yum clean all

Here, we have completed the operation of replacing the rhel yum source with Centos.

Related Article

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.