Centos 5 Yum update source

Source: Internet
Author: User

If you have installed centos and the yum update is slow, you can replace the update source with the one provided by Netease: mirrors.163.com.

The procedure is as follows:

CD/etc/yum. Repos. d/
MV CentOS-Base.repo CentOS-Base.repo.bak

VI CentOS-Base.repo

Add the following content:

 

 

  1. # CentOS-Base.repo
  2. #
  3. # This file uses a new release list system developed by Lance Davis for centos.
  4. # The mirror system uses the connecting IP address of the client and
  5. # Update Status of each mirror to pick mirrors that are updated to and
  6. # Geographically close to the client. You shoshould use this for centos updates
  7. # Unless you are manually picking other mirrors.
  8. #
  9. # If the specified list = does not work for you, as a fall back you can try
  10. # Remarked out baseurl = line instead.
  11. #
  12. #
  13. [Base]
  14. Name = centos-$ releasever-Base
  15. # Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS
  16. # Baseurl = http://developer.centos.org/centos/?releasever/ OS /?basearch/
  17. Baseurl = http://mirrors.163.com/centos/?releasever/ OS /?basearch/
  18. Gpgcheck = 1
  19. Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
  20. # Released updates
  21. [Updates]
  22. Name = centos-$ releasever-Updates
  23. # Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = updates
  24. # Baseurl = http://developer.centos.org/centos/?releasever/updates/?basearch/
  25. Baseurl = http://mirrors.163.com/centos/?releasever/updates/?basearch/
  26. Gpgcheck = 1
  27. Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
  28. # Packages used/produced in the build but not released
  29. [Addons]
  30. Name = centos-$ releasever-Addons
  31. # Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = Addons
  32. # Baseurl = http://developer.centos.org/centos/?releasever/addons/?basearch/
  33. Baseurl = http://mirrors.163.com/centos/?releasever/addons/?basearch/
  34. Gpgcheck = 1
  35. Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
  36. # Additional packages that may be useful
  37. [Extras]
  38. Name = centos-$ releasever-extras
  39. # Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = extras
  40. # Baseurl = http://developer.centos.org/centos/?releasever/extras/?basearch/
  41. Baseurl = http://mirrors.163.com/centos/?releasever/extras/?basearch/
  42. Gpgcheck = 1
  43. Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
  44. # Additional packages that extend functionality of existing packages
  45. [Centosplus]
  46. Name = centos-$ releasever-plus
  47. # Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = centosplus
  48. # Baseurl = http://developer.centos.org/centos/?releasever/centosplus/?basearch/
  49. Baseurl = http://mirrors.163.com/centos/?releasever/centosplus/?basearch/
  50. Gpgcheck = 1
  51. Enabled = 0
  52. Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
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.