CentOS更换网易yum源

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yueludanfeng/article/details/79434511

备份本地的yum源配置文件

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

下载对应版本repo文件, 放入/etc/yum.repos.d

以centos7为例
cd /etc/yum.repos.d/  && wget http://mirrors.163.com/.help/CentOS7-Base-163.repo 
mv CentOS7-Base-163.repo CentOS-Base.repo

生产缓存

yum clean all
yum makecache

参考网址:http://mirrors.163.com/.help/centos.html

猜你喜欢

转载自blog.csdn.net/yueludanfeng/article/details/79434511
今日推荐