RedHatEnterpriseLinux6 use CentOS6 yum Source

Source: Internet
Author: User
Use the yum source of CentOS6 in RedHatEnterpriseLinux6. Recommended: RedHatLinux local yum source configuration example

Use the yum source of CentOS 6 in RedHat Enterprise Linux 6.

Recommended reading:

Configuration http://www.linuxidc.com/Linux/2013-08/88217.htm for local yum sources in RedHat Linux

RedHat 6.2 Linux modify yum source free use CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm

Configure epel yum source http://www.linuxidc.com/Linux/2012-10/71850.htm

Redhat local yum source configuration http://www.linuxidc.com/Linux/2012-11/75127.htm

Yum profile description http://www.linuxidc.com/Linux/2013-04/83298.htm

Install yum http://www.linuxidc.com/Linux/2013-06/86535.htm in RedHat 6.1

YUM installation and cleaning http://www.linuxidc.com/Linux/2013-07/87163.htm

Idea: uninstall the yum of redhat, download the yum of centos, and modify the configuration file after installation.

1. First download the software package from http://mirrors.163.com/centos


X86 address: http://mirrors.163.com/centos/6/ OS /i386/Packages/

X86_64: http://mirrors.163.com/centos/6/ OS /x86_64/Packages/

The necessary software packages are available (taking a 64-bit system as an example ):

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

B yum-3.2.29-40.el6.centos.noarch.rpm

Yum-metadata-parser-1.1.2-16.el6.x86_64.rpm c

D yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

Download command:


Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm

Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
 

[Note]: The latest version is not required.


2. Uninstall the yum that comes with RedHat.


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

Note: a and xargs are common commands for Unix and Unix-like operating systems. It is used to convert the parameter list into small segments and pass it to other commands to avoid the problem that the parameter list is too long.

B. -- The nodeps is forcibly uninstalled regardless of the dependency.


3. Install the downloaded centos yum package:


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 yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm


[Note]: The last two must be installed together. Otherwise, a dependency error occurs.


4. Download The http://mirrors.163.com file to the centos help document for the CentOS6-Base-163.repo and store it in/etc/yum. repo. d.


Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo


5. Edit the CentOS6-Base-163.repo file and change $ releasever to the centos version

The changes are as follows:

# CentOS-Base.repo

#

# The mirror system uses the connecting IP address of the client and

# Update status of each mirror to pick mirrors that are updated to and

# Geographically close to the client. You shoshould use this for CentOS updates

# Unless you are manually picking other mirrors.

#

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

# Remarked out baseurl = line instead.

#

#


[Base]

Name = CentOS-6-Base-163.com

Baseurl = http://mirrors.163.com/centos/6/ OS /?basearch/

# Items list = 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/

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

Gpgcheck = 1

Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


# Additional packages that may be useful

[Extras]

CentOS-6-Extras-163.com

Baseurl = http://mirrors.163.com/centos/6/extras/?basearch/

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

Gpgcheck = 1

Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


# Additional packages that extend functionality of existing packages

[Centosplus]

CentOS-6-Plus-163.com

Baseurl = http://mirrors.163.com/centos/6/centosplus/?basearch/

# Items list = 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]

CentOS-6-Contrib-163.com

Baseurl = http://mirrors.163.com/centos/6/contrib/?basearch/

# Items list = 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

 

CentOS-Base.repo file, which is the source file for centos and needs to be renamed as a rhel-debuginfo.repo copy to/etc/yum. repos. d/

6. yum clean all clear the original Cache

7. yum makecache to obtain the yum list

The following prompt is displayed, indicating that the yum change is complete:

Metadata Cache Created

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

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.