#backup
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
#Change yum to Alibaba Cloud
cd etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#install EPEL source
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
#renew
sudo yum clean all
sudo yum makecache
Reprint address: http://www.up123.cc/9.html