The RedHat system uses the yum network source

Source: Internet
Author: User
The yum Network Resources of RedHatLinux are not as good as CentOS. Therefore, you need to uninstall the yum and download and install centOS 5 from the yum of CentOS. You can also refer to install centOS 6 1. to download centos yum, you 'd better open http://centos.ustc.edu.cn/centos/5/ OS/I #/centos/in your browser before using centos 5.

The yum Network Resources of RedHat Linux are not as good as CentOS. Therefore, You Need To uninstall yum and download and install centOS yum first.

The following is the installation of centos 5. For more information, see install centos6

1. Download centos yum and use centos 5

Before downloading, you 'd better open the idea in your browser,

# 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
# Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

 

2. Find the current yum program and uninstall it.


# Rpm-qa | grep yum


# Rpm-e yum-3.2.22-20.el5 -- nodeps
# Rpm-e yum-updatesd-0.9-2.el5 -- nodeps
# Rpm-e yum-security-1.1.16-13.el5 -- nodeps
# Rpm-e yum-metadata-parser-1.1.2-3.el5 -- nodeps
# Rpm-e yum-rhn-plugin-0.5.4-13.el5 -- nodeps


3. Download and import the KEY
# Cd/etc/pki/rpm-gpg/
# Wget http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
# Rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEYCentOS-5


4. Install the yum installation package
Rpm-ivh yum-3.2.22-33.el5.centos.noarch.rpm \
Yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm \
Yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

5. Create a configuration file


Vi/etc/yum. repos. d/local. repo (or directly open the created local. repo in the text editor, copy and paste the following content)


[Base]
Name = Red Hat Enterprise Linux $ releasever-Base
Baseurl = http://mirrors.sohu.com/centos/5.5/ OS /?basearch/
Gpgcheck = 1


[Update]
Name = Red Hat Enterprise Linux $ releasever-Updates
Baseurl = http://mirrors.sohu.com/centos/5.5/updates/?basearch/
Gpgcheck = 1


[Extras]
Name = Red Hat Enterprise Linux $ releasever-Extras
Baseurl = http://mirrors.sohu.com/centos/5.5/extras/?basearch/
Gpgcheck = 1


[Addons]
Name = Red Hat Enterprise Linux $ releasever-Addons
Baseurl = http://mirrors.sohu.com/centos/5.5/addons/?basearch/
Gpgcheck = 1


So far yum installation is complete,

Before installing the yum install program, you 'd better enter the following command

# Yum clean all

# Yum update

The red background or red text indicates that these should be changed based on the version listed on the website, or based on the Local Computer path or something.

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

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.