mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
cd /etc/yum.repos.d
vim CentOS-Base.repo
修改 CentOs-Base.repo中的所有 http:// 为 https:// ,并保存退出。
yum update