Centos6更新yum repo

163开源镜像站是国内比较老的一个网站。很多人都在使用.

step 1/3

备份原镜像文件:

cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.backup

 

step 2/3

下载新的CentOS-Base.repo到/etc/yum.repos.d/:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo

 

step 3/3

运行yum makecache生成缓存:

yum clean all  
yum makecache 

 

当然,除了网易之外,国内还有其他不错的yum源,大家可以根据自己需求下载,比如阿里:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

 

posted on 2017-08-09 11:00  _Joshua  阅读(417)  评论(0编辑  收藏  举报

导航