CentOS 6 yumソース変更



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