1.先备份现有的yum仓库源
命令:
cd /etc/yum.repos.d
mv /etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.bak
2.下载阿里云的yum仓库源
命令:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.清除缓存下载源
命令:
yum clean all
yum makecache