将centos7镜像源更新为阿里镜像源
1.被分享centos7自带的镜像源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载CentOS 7的repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.更新镜像源
重新生成缓存
yum clean all yum makecache
4.将文件中的所有http开头的地址更改为https
vim /etc/yum.repos.d
5.更新yum
yum update