RedHat6.2Linux: Modify yum source use CentOS source for free

Source: Internet
Author: User
If you do not have a CD, you need to install the software package using the yum source of the common network. In RedHatlinux, yum software is installed by default. However, due to authentication activation, redhat cannot directly install some yum software. If we need to install the software directly under redhat, we only need to change the yum source to CentOS, and then change all the variables in the source to the actual values, so that we can directly install the required software using yum. Instructions for use 1.

If you do not have a CD, you need to install the software package using the yum source of the common network.

In RedHat linux, yum software is installed by default. However, due to authentication activation, redhat cannot directly install some yum software. If we need to install the software directly under redhat, we only need to change the yum source to CentOS, and then change all the variables in the source to the actual values, so that we can directly install the required software using yum.

Instructions for use

1. 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.

Centos 5 wget http://mirrors.163.com/.help/CentOS5-Base-163.repo

Centos 6 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

The procedure is as follows:

2. First back up/etc/yum. repos. d/CentOS-Base.repo

3. Edit the CentOS6-Base-163.repo file and change $ releasever to the centos version. If it is RedHat 6.2 X86_64, for example, "baseurl = listen 6.2 32-bit as an example!

 

[Base]

Name = CentOS-6.2-Base-163.com

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

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

Gpgcheck = 1

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

# Released updates

[Updates]

Name = CentOS-6.2-Updates-163.com

Baseurl = http://mirrors.163.com/centos/6.2/updates/?basearch/

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

Gpgcheck = 1

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

# Additional packages that may be useful

[Extras]

CentOS-6.2-Extras-163.com

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

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

Gpgcheck = 1

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

# Additional packages that extend functionality of existing packages

[Centosplus]

CentOS-6. 2-Plus-163.com

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

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

Gpgcheck = 1

Enabled = 0

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

# Contrib-packages by Centos Users

[Contrib]

CentOS-6.2-Contrib-163.com

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

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

Gpgcheck = 1

Enabled = 0

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

After editing, save and run:

Yum clean all clear original Cache

Yum makecache get yum list

Related reading:

RedHat set Yum source http://www.linuxidc.com/Linux/2013-06/86202.htm

Build an intranet yum server http://www.linuxidc.com/Linux/2013-07/86847.htm

Build a LAN CentOS Yum server http://www.linuxidc.com/Linux/2012-05/60167.htm

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

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.