RHEL6.5 porting a yum step using CentOS

Source: Internet
Author: User

problem: Using Red Hat Enterprise Linux Server (RHEL) Yum display when installing software This system isn't registered with the portal. Portal support would be disabled.

Reason:

Red Hat Enterprise Linux Server (RHEL) Yum service is paid because there is no payment, so yum can not be used to install software, such as RHEL want to install Yum, one possible way is to transplant the use of CentOS yum.

Workaround:

Step One: Uninstall RHEL of the Yum , and download CentOS the corresponding package

Execution: Rpm-qa|grep Yum|xargs rpm-e--nodeps to uninstall Yum

Cat/etc/issue && uname-a Look at the system version number and the number of system bits

To http://mirrors.kernel.org/centos/or http://mirrors.163.com/centos/to find the corresponding system version number

If the system is 5.* 64-bit, open the http://mirrors.kernel.org/centos/5/os/x86_64/CentOS/
If the system is 5.* 32-bit, open the http://mirrors.kernel.org/centos/5/os/i386/CentOS/
If the system is 6.* 64-bit: http://mirrors.kernel.org/centos/6/os/x86_64/Packages/
If the system is 6.* 32-bit: http://mirrors.kernel.org/centos/6/os/i386/Packages/

The downloaded files include:

python-iniparse-0.3.1-2.1.el6.noarch.rpm

python-urlgrabber-3.9.1-11.el6.noarch.rpm

yum-3.2.29-73.el6.centos.noarch.rpm

yum-metadata-parser-1.1.2-16.el6.i686.rpm

yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

Step two: Install CentOS the corresponding package

Installation steps:

RPM-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm

RPM-IVH yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

RPM-IVH python-urlgrabber-3.9.1-11.el6.noarch.rpm

This step may have the following error

Warning:python-urlgrabber-3.9.1-11.el6.noarch.rpm:header V3 rsa/sha1signature, key ID C105b9de:nokey

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

file/usr/lib/python2.6/site-packages/urlgrabber/grabber.py from Installof Python-urlgrabber-3.9.1-11.el6.noarch Conflicts with file from Packagepython-urlgrabber-3.9.1-8.el6.noarch

File/usr/lib/python2.6/site-packages/urlgrabber/grabber.pyc from Installof Python-urlgrabber-3.9.1-11.el6.noarch Conflicts with file from Packagepython-urlgrabber-3.9.1-8.el6.noarch

File/usr/lib/python2.6/site-packages/urlgrabber/grabber.pyo from Installof Python-urlgrabber-3.9.1-11.el6.noarch Conflicts with file from Packagepython-urlgrabber-3.9.1-8.el6.noarch

File/usr/lib/python2.6/site-packages/urlgrabber/progress.pyc from Installof Python-urlgrabber-3.9.1-11.el6.noarch Conflicts with file from Packagepython-urlgrabber-3.9.1-8.el6.noarch

File/usr/lib/python2.6/site-packages/urlgrabber/progress.pyo from Installof Python-urlgrabber-3.9.1-11.el6.noarch Conflicts with file from Packagepython-urlgrabber-3.9.1-8.el6.noarch

The reason is a package conflict, which requires uninstalling the original Urlgrabber package:

[Email protected]]# rpm-qa |grep Urlgrabber

Python-urlgrabber-3.9.1-8.el6.noarch

[Email protected]]# rpm-e Python-urlgrabber-3.9.1-8.el6.noarch

And then install it again.

Then install Yum

RPM-IVH yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

Step three: Build YUM.REPOS.D file

Download the Centos6-base-163.repo file in the http://mirrors.163.com CentOS Help document and store it in/ETC/YUM.REPOS.D

#wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo

Renamed as: Centos6-base.repo

Then change the $releasever in the file to your Linux version (6 or 5), that is, the file can be modified as follows:

# Centos-base.repo

#

# The Mirror systemuses the connecting IP address of the client and the

# Update Status Ofeach Mirror to pick mirrors that is updated to and

# Geographicallyclose to the client. You should the use of this for CentOS updates

# unless aremanually picking other mirrors.

#

# If themirrorlist= does not work for you, as a fall back to you can try the

# remarked Outbaseurl= line instead.

#

#

[Base]

Name=centos-6-base-163.com

baseurl=http://mirrors.163.com/centos/6/os/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=os

Gpgcheck=1

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#released Updates

[Updates]

Name=centos-6-updates-163.com

baseurl=http://mirrors.163.com/centos/6/updates/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=updates

Gpgcheck=1

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#additionalpackages that could be useful

[Extras]

Name=centos-6-extras-163.com

baseurl=http://mirrors.163.com/centos/6/extras/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=extras

Gpgcheck=1

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#additionalpackages that extend functionality of existing packages

[Centosplus]

Name=centos-6-plus-163.com

baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=centosplus

Gpgcheck=1

Enabled=0

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#contrib-packages by Centos Users

[Contrib]

Name=centos-6-contrib-163.com

baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=contrib

Gpgcheck=1

Enabled=0

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

Step four: Rebuild the cache

Yum Clean all clears the original cache

Yummakecache get Yum List

Wait, after about three minutes, the following prompt appears, indicating that the Yum change is complete:

Metadata cachecreated

RHEL6.5 porting a yum step using CentOS

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.