首先确保你的系统是centos5或者centos6
 
先备份你系统自带的repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup


切换为root用户
cd /etc/yum.repos.d/
如果你是centos5用户就用
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
如果是centos6用户就使用
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

然后修改名字
mv CentOS6-Base-163.repo CentOS-Base.repo
最后生成缓存
yum makecache
Posted on 2014-12-20 13:32  tabbycat  阅读(279)  评论(0编辑  收藏  举报