RedHat CentOS system source

Source: Internet
Author: User

RedHat cannot use the official update source. Therefore, you have to replace the RedHat official source with the CentOS open source. The procedure is as follows:

1. Replace the RedHat yum program:

[Plain] view plaincopy
  1. [Root @ leekwen] # cat/etc/issue
  2. RedHatEnterpriseLinuxServerrelease5.5 (Tikanga)
  3. Kernel \ ronan \ m
  4. [Root @ leekwen] # rpm-qa | grepyum
  5. [Root @ leekwen] # rpm-eyum-3.2.22-20.el5 -- nodeps
  6. [Root @ leekwen] # rpm-eyum-updatesd-0.9-2.el5 -- nodeps
  7. [Root @ leekwen] # rpm-eyum-security-1.1.16-13.el5 -- nodeps
  8. [Root @ leekwen] # rpm-eyum-metadata-parser-1.1.2-3.el5 -- nodeps
  9. [Root @ leekwen] # rpm-eyum-rhn-plugin-0.5.4-13.el5 -- nodeps

2. Download The CentOS yum Program (My 32bit server is here. If the 64-bit server is used, modify the download path on your own ):

[Plain] view plaincopy
  1. [Root @ leekwen] # wget-chttp: // logs
  2. [Root @ leekwen] # wget-chttp: // logs
  3. [Root @ leekwen] # wget-chttp: // logs

3. Install the CentOS yum program:

[Plain] view plaincopy
  1. [Root @ leekwen] # rpm-ivhyum-3.2.22-40.el5.centos.noarch.rpmyum-fastestmirror-1.1.16-21.el5.centos.noarch.rpmyum-metadata-parser-1.1.2-4.el5.i386.rpm

4. Modify the yum source of CentOS:

[Plain] view plaincopy
  1. [Root @ leekwen] # cd/etc/yum. repos. d/
  2. [Root @ leekwen] # cprhel-debuginfo.reporhel-debuginfo.repo.bak
  3. [Root@leekwenyum.repos.d] # echo> rhel-debuginfo.repo
  4. [Root@leekwenyum.repos.d] # catrhel-debuginfo.repo
  5. [Base]
  6. Name = CentOS-5-Base
  7. Repo = OS
  8. Baseurl = http://centos.ustc.edu.cn/centos/5/ OS /?basearch/
  9. Gpgcheck = 1
  10. Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  11. [Update]
  12. Name = CentOS-5-Updates
  13. Baseurl = http://centos.ustc.edu.cn/centos/5/updates/?basearch/
  14. Gpgcheck = 1
  15. Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  16. [Addons]
  17. Name = CentOS-5-Addons
  18. Baseurl = http://centos.ustc.edu.cn/centos/5/addons/?basearch/
  19. Gpgcheck = 1
  20. Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  21. [Extras]
  22. Name = CentOS-5-Extras
  23. Baseurl = http://centos.ustc.edu.cn/centos/5/extras/?basearch/
  24. Gpgcheck = 1
  25. Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  26. [Centosplus]
  27. Name = CentOS-5-Plus
  28. Baseurl = http://centos.ustc.edu.cn/centos/5/centosplus/?basearch/
  29. Gpgcheck = 1
  30. Enabled = 0
  31. Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  32. [Contrib]
  33. Name = CentOS-5-Contrib
  34. Baseurl = http://centos.ustc.edu.cn/centos/5/contrib/?basearch/
  35. Gpgcheck = 1
  36. Enabled = 0
  37. Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  38. ###################

5. Execute the yum upgrade:

[Plain] view plaincopy
  1. [Root @ leekwen] # yumupdate

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.