RHEL x86_64 6.0 use centos6.0 Yum Source

Source: Internet
Author: User

1. For convenience, switch to the root user first

2. Delete the yum that comes with rhel6 first.

Rpm-AQ | grep Yum | xargs rpm-e -- nodeps


3. Download centos6 yum

wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm 

4. install these RPM packages. You may have dependency problems during installation. Just try them several times.

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpmrpm -ivh yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpmrpm -ivh yum-3.2.27-14.el6.centos.noarch.rpm  yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm


5. Download The centos repo source configuration file. I downloaded the centos5 configuration. You must make some modifications to use it on centos6. I have already changed the source image. I use 163 of the source images in China.

[base]name=CentOS-6 - Baserepo=osbaseurl=http://mirrors.163.com/centos/6/os/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates[update]name=CentOS-6 - Updatesbaseurl=http://mirrors.163.com/centos/6/updates/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#packages used/produced in the build but not released#[addons]#name=CentOS-6 - Addons#baseurl=http://mirrors.163.com/centos/5/addons/$basearch/#gpgcheck=1#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#additional packages that may be useful[extras]name=CentOS-6 - Extrasbaseurl=http://mirrors.163.com/centos/6/extras/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6 - Plusbaseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/gpgcheck=1enabled=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-6 - Contribbaseurl=http://mirrors.163.com/centos/6/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

6. Then put the CentOS-Base.repo under the/etc/yum. Repos. d/directory.

mv ./CentOS-Base.rep /etc/yum.repos.d/


7. Clear Yum Cache

yum clean all

8. It should be ready for use now.

Try: Yum search nginx

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.