- 下載CentOS 7的repo文件
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 更新鏡像源
清除緩存:yum clean all
生成緩存:yum makecache
- 找到y(tǒng)um源的配置路徑
cd /etc/yum.repos.d
vi CentOS-Base.repo
將文件中的所有http開頭的地址更改為https
:%s#http#https#g
- 更新yum:
yum update