CentOS7修改yum源

使用国外的yum源速度很慢,且下载稍大一点的文件会频繁失败。

备份本地yum源配置文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
获取阿里云yum源配置文件,并替换原yum文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
更新cache
yum clean all
yum makecache

猜你喜欢

转载自blog.csdn.net/Lonely_Ant/article/details/81534514