rhel6使用centos源 更新服务器

 

  
  
  
  
  1. #删除自带yum  
  2. rpm -aq|grep yum|xargs rpm -e --nodeps 
  3. rpm -ivh http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm  
  4. rpm -ivh http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm  
  5. #这两个必须一起装 
  6. rpm -ivh http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm  http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm  
  7. #下载163源 
  8. cd /etc/yum.repos.d/ 
  9. wget http://mirrors.163.com/.help/CentOS6-Base-163.repo 
  10. sed -i "s/\$releasever/6/" CentOS6-Base-163.repo
  11. #测试一下
  12. yum makecache 

 

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