> CentOS > CentOS入门 >

CentOS 7 (7.1.1503) 的163源

网上找了很久都找不到centos 7 的163源,大多只有6的配置。写了一个7能用的。注意下版本,换成自己的版本吧

[html] view plaincopyprint?在CODE上查看代码片派生到我的代码片
 
  1. [base]  
  2. name=CentOS-$releasever - Base - 163.com  
  3. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os  
  4. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64  
  5. gpgcheck=0  
  6. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7  
  7.   
  8. #released updates  
  9. [updates]  
  10. name=CentOS-$releasever - Updates - 163.com  
  11. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates  
  12. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64  
  13. gpgcheck=0  
  14. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7  
  15.   
  16. #packages used/produced in the build but not released  
  17. [addons]  
  18. name=CentOS-$releasever - Addons - 163.com  
  19. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons  
  20. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64  
  21. gpgcheck=0  
  22. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7  
  23.   
  24. #additional packages that may be useful  
  25. [extras]  
  26. name=CentOS-$releasever - Extras - 163.com  
  27. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras  
  28. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64  
  29. gpgcheck=0  
  30. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7  
  31.   
  32. #additional packages that extend functionality of existing packages  
  33. [centosplus]  
  34. name=CentOS-$releasever - Plus - 163.com  
  35. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus  
  36. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64  
  37. gpgcheck=0  
  38. enabled=0  
  39. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7  
  40.   
  41. #contrib - packages by Centos Users  
  42. [contrib]  
  43. name=CentOS-$releasever - Contrib - 163.com  
  44. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib  
  45. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64  
  46. gpgcheck=0  
  47. enabled=0  
  48. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7  

要修改的文件在这个路径下:/etc/yum.repos.d

 

记得备份下原文件。




(责任编辑:IT)