使用国外的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