Centos7yum源修改为国内阿里源

centos7下预置的yum源应用安装及更新比较慢,有时还掉链子,更换到国内的源比较省心,这里以阿里源为例。

进入到源文件目录 cd /etc/yum.repos.d

备份旧的配置文件 mv CentOS-Base.repo CentOS-Base.repo.bak

下载阿里源的文件 wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清理缓存 yum clean all

重新生成缓存 yum makecache

原文地址:https://www.cnblogs.com/juneman/p/8594633.html