Redhat 6 using the CentOS source Yum installation

Source: Internet
Author: User
Tags gpg

1. Delete Redhat original Yum source
# Rpm-aq | grep Yum|xargs rpm-e--nodeps
2. Download the new Yum installation package

Here we use the source of the CentOS Yum

# wget http://mirror.centos.org/centos/6.0/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm# wget/http mirror.centos.org/centos/6.0/os/i386/packages/yum-metadata-parser-1.1.2-14.1.el6.i686.rpm# wget/HTTP mirror.centos.org/centos/6.0/os/i386/packages/yum-3.2.27-14.el6.centos.noarch.rpm# wget http://mirror.centos.org /centos/6.0/os/i386/packages/yum-plugin-fastestmirror-1.1.26-1.el6.noarch.rpm
If wget not, you can try to find the http://mirrors.163.com/centos/6/os/x86_64/Packages/3, install the Yum package
# RPM-IVH  python-iniparse-0.3.1-2.1.el6.noarch.rpm# rpm-ivh  yum-metadata-parser-1.1.2-14.1.el6.i686.rpm# RPM-IVH  yum-3.2.27-14.el6.centos.noarch.rpm  yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

Note: The last two packages are to be installed together at the same time, otherwise you will be prompted to rely on each other and the installation fails.

4. Change the Yum source #我们使用网易的CentOS镜像源
# cd/etc/yum.repos.d/# wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo# VI Centos6-base-163.repo

Edit the file and replace all the $releasever in the file with the version number, which is 6 last saved! Or simply copy the following memory to the Centos6-base-163.repo file (modified)

########################################################################## centos-base.repo## The Mirror system Uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that is updated to and  # Geographically close to the client. You should use this for CentOS updates# unless is manually picking other mirrors.## If the mirrorlist= does For your, as a fall back you can try the# remarked off baseurl= line instead.##[base]name=centos-6-base-163.combaseurl= http://mirrors.163.com/centos/6/os/$basearch/#mirrorlist =http://mirrorlist.centos.org/?release=6&arch=$ Basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6#released updates[ Updates]name=centos-6-updates-163.combaseurl=http://mirrors.163.com/centos/6/updates/$basearch/#mirrorlist = Http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=updatesgpgcheck=1gpgkey=http:// Mirror.centos.org/centos/rpm-gpg-key-centos-6#additional PACkages that could be useful[extras]name=centos-6-extras-163.combaseurl=http://mirrors.163.com/centos/6/extras/$ basearch/#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=extrasgpgcheck= 1gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6#additional packages that extend functionality of Existing Packages[centosplus]name=centos-6-plus-163.combaseurl=http://mirrors.163.com/centos/6/centosplus/$ basearch/#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=centosplusgpgcheck= 1enabled=0gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6#contrib-packages by CentOS Users[contrib] Name=centos-6-contrib-163.combaseurl=http://mirrors.163.com/centos/6/contrib/$basearch/#mirrorlist =http:// Mirrorlist.centos.org/?release=6&arch= $basearch &repo=contribgpgcheck=1enabled=0gpgkey=http:// mirror.centos.org/centos/rpm-gpg-key-centos-6################################################################# ########
5. Clean up Yum Cache
# yum Clean all# yum makecache     #将服务器上的软件包信息缓存到本地 to improve the speed of search and install software # yum install vim*    #测试域名是否可用

At this point, Redhat6 can use CentOS's yum source to install software online!

Redhat 6 using the CentOS source Yum installation

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.