CentOS 7 (7.1.1503) 的163源

分类:CentOS教程 阅读:62862 次

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

  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. #releasedupdates
  8. [updates]
  9. name=CentOS-$releasever-Updates-163.com
  10. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  11. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
  12. gpgcheck=0
  13. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  14. #packagesused/producedinthebuildbutnotreleased
  15. [addons]
  16. name=CentOS-$releasever-Addons-163.com
  17. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
  18. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
  19. gpgcheck=0
  20. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  21. #additionalpackagesthatmaybeuseful
  22. [extras]
  23. name=CentOS-$releasever-Extras-163.com
  24. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  25. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
  26. gpgcheck=0
  27. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  28. #additionalpackagesthatextendfunctionalityofexistingpackages
  29. [centosplus]
  30. name=CentOS-$releasever-Plus-163.com
  31. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  32. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
  33. gpgcheck=0
  34. enabled=0
  35. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  36. #contrib-packagesbyCentosUsers
  37. [contrib]
  38. name=CentOS-$releasever-Contrib-163.com
  39. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
  40. baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
  41. gpgcheck=0
  42. enabled=0
  43. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

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

记得备份下原文件。