无限星辰工作室-客户无限互联网动力之源

标题: centos5安装yum源 [打印本页]

作者: crx349    时间: 2018-10-26 14:43
标题: centos5安装yum源
最近用到一台centos5的机器~居然yum不能,发现源是阿里云的。。。。

目前centos5 阿里云和163的源已经完成不能用了,只能国外找了
找到一个
分享下:
  1. cd /etc/yum.repos.d

  2. vi CentOS-Base.repo
复制代码

  1. # The mirror system uses the connecting IP address of the client and the  
  2. # update status of each mirror to pick mirrors that are updated to and  
  3. # geographically close to the client.  You should use this for CentOS updates  
  4. # unless you are manually picking other mirrors.  
  5. #  
  6. # If the mirrorlist= does not work for you, as a fall back you can try the   
  7. # remarked out baseurl= line instead.  
  8. #  
  9. #  


  10. [base]  
  11. name=CentOS-$releasever - Base  
  12. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os  
  13. #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/  
  14. baseurl=http://vault.centos.org/5.11/os/$basearch/  
  15. gpgcheck=1  
  16. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5  


  17. #released updates   
  18. [updates]  
  19. name=CentOS-$releasever - Updates  
  20. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates  
  21. #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/  
  22. baseurl=http://vault.centos.org/5.11/updates/$basearch/  
  23. gpgcheck=1  
  24. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5  


  25. #additional packages that may be useful  
  26. [extras]  
  27. name=CentOS-$releasever - Extras  
  28. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras  
  29. #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/  
  30. baseurl=http://vault.centos.org/5.11/extras/$basearch/  
  31. gpgcheck=1  
  32. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5  




  33. #additional packages that extend functionality of existing packages  
  34. [centosplus]  
  35. name=CentOS-$releasever - Plus  
  36. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus  
  37. #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/  
  38. baseurl=http://vault.centos.org/5.11/centosplus/$basearch/  
  39. gpgcheck=1  
  40. enabled=0  
  41. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5  




  42. #contrib - packages by Centos Users  
  43. [contrib]  
  44. name=CentOS-$releasever - Contrib  
  45. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib  
  46. #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/  
  47. baseurl=http://vault.centos.org/5.11/contrib/$basearch/  
  48. gpgcheck=1  
  49. enabled=0  
  50. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
复制代码


保存后
  1. yum clean all
  2. yum makecache
复制代码

因为是国外源,比较慢~可以去喝杯茶~慢慢等




欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://xmspace.net/) Powered by Discuz! X3.4