RHELX86646.0 use CentOS6.0 yum Source

Source: Internet
Author: User
Tags gpg
1. for convenience, switch to the root user first. first, delete the yumrpm-aq | grepyum | xargsrpm-e -- nodeps3. download the yumwgethttp: // kernel of CentOS6. 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 the yum of CentOS 6

  1. Wget http://mirrors.163.com/centos/6.0/ OS /x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
  2. Wget http://mirrors.163.com/centos/6.0/ OS /x86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
  3. Wget http://mirrors.163.com/centos/6.0/ OS /x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
  4. 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.

  1. Rpm-ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
  2. Rpm-ivh yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
  3. Rpm-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 CentOS 5 configuration. www.linuxidc.com needs some modifications to use it on CentOS6. I have already changed the source image. I use 163 of the source images in China.
  1. [Base]
  2. Name=CentOS-6-Base
  3. Repo=OS
  4. Baseurl=Http: // Mirrors.163.com/centos/6/ OS /?basearch/
  5. Gpgcheck=1
  6. Gpgkey=Http: // Developer.centos.org/centos/rpm-gpg-key-centos-6
  7. # Released updates
  8. [Update]
  9. Name=CentOS-6-Updates
  10. Baseurl=Http: // Mirrors.163.com/centos/6/updates/?basearch/
  11. Gpgcheck=1
  12. Gpgkey=Http: // Developer.centos.org/centos/rpm-gpg-key-centos-6
  13. # Packages used/produced in the build but not released
  14. # [Addons]
  15. #Name=CentOS-6-Addons
  16. #Baseurl=Http: // Mirrors.163.com/centos/5/addons/?basearch/
  17. #Gpgcheck=1
  18. #Gpgkey=Http: // Developer.centos.org/centos/rpm-gpg-key-centos-5
  19. # Additional packages that may be useful
  20. [Extras]
  21. Name=CentOS-6-Extras
  22. Baseurl=Http: // Mirrors.163.com/centos/6/extras/?basearch/
  23. Gpgcheck=1
  24. Gpgkey=Http: // Developer.centos.org/centos/rpm-gpg-key-centos-6
  25. # Additional packages that extend functionality of existing packages
  26. [Centosplus]
  27. Name=CentOS-6-Plus
  28. Baseurl=Http: // Mirrors.163.com/centos/6/centosplus/?basearch/
  29. Gpgcheck=1
  30. Enabled=1
  31. Gpgkey=Http: // Developer.centos.org/centos/rpm-gpg-key-centos-6
  32. # Contrib-packages by Centos Users
  33. [Contrib]
  34. Name=CentOS-6-Contrib
  35. Baseurl=Http: // Mirrors.163.com/centos/6/contrib/?basearch/
  36. Gpgcheck=1
  37. Enabled=0
  38. Gpgkey=Http: // Developer.centos.org/centos/rpm-gpg-key-centos-6
6. Then put the CentOS-Base.repo under the/etc/yum. repos. d/directory.
  1. Mv./CentOS-Base.rep/etc/yum. repos. d/

7. Clear yum Cache
  1. Yum clean all
8. It should be ready for use now.

Try: yum search nginx

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.