1、进入目录:/etc/yum.repos.d
2、备份:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3、更换新的源;
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
(注:阿里源:https://developer.aliyun.com/mirror/)
4、清空缓存
yum clean all
5、建立缓存
yum makecache
网友评论