一、确保更换之前确保自己安装wget,若没安装wget直接命令安装
检查是否安装wget
yum list wget
安装wget
yum -y install wget
二、首先备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
三、下载阿里云的yum源到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
四、清除缓存
yum clean all