CentOS 6 yum源更改

  
  
  
  
  1. 备份
  2. mv /etc/yum.repos.d/CentOS-Base.repo{,.bak}
  3. 修改 
  4. vi /etc/yum.repos.d/CentOS-Base.repo
  5. # CentOS-Base.repo 
  6. # The mirror system uses the connecting IP address of the client and the 
  7. # update status of each mirror to pick mirrors that are updated to and 
  8. # geographically close to the client. You should use this for CentOS updates 
  9. # unless you are manually picking other mirrors. 
  10. # If the mirrorlist= does not work for you, as a fall back you can try the  
  11. # remarked out baseurl= line instead. 
  12.  
  13. [base] 
  14. name=CentOS-$releasever - Base 
  15. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os 
  16. baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/ 
  17. gpgcheck=1 
  18. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 
  19.  
  20. #released updates  
  21. [updates] 
  22. name=CentOS-$releasever - Updates 
  23. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates 
  24. baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/ 
  25. gpgcheck=1 
  26. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 
  27.  
  28. #additional packages that may be useful 
  29. [extras] 
  30. name=CentOS-$releasever - Extras 
  31. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras 
  32. baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/ 
  33. gpgcheck=1 
  34. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 
  35.  
  36. #additional packages that extend functionality of existing packages 
  37. [centosplus] 
  38. name=CentOS-$releasever - Plus 
  39. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus 
  40. baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/ 
  41. gpgcheck=1 
  42. enabled=0 
  43. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 
  44.  
  45. #contrib - packages by Centos Users 
  46. [contrib] 
  47. name=CentOS-$releasever - Contrib 
  48. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib 
  49. baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/ 
  50. gpgcheck=1 
  51. enabled=0 
  52. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 
  53.  
  54. # yum makecache 
  55.  
  56. # yum update 
  57.  
  58. # yum -y groupinstall Desktop 
  59. # yum -y groupinstall "X Window System" 
  60. # yum -y groupinstall "Chinese Support" 

 

你可能感兴趣的:(centos,职场,休闲,yum源)