mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
阿里开源镜像站:https://developer.aliyun.com/mirror/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo
#替换版本,$releasever替换6.8, 6.8是我用的版本sed -i 's/$releasever/6.8/g' /etc/yum.repos.d/CentOS-Base.repo#替换centos为centos-vaultsed -i 's/centos/centos-vault/g' /etc/yum.repos.d/CentOS-Base.repo
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.reposed -i 's/http/https/g' /etc/yum.repos.d/CentOS-Base.repo
yum makecache
Copyright © 2013-2021 8a.hk All Rights Reserved. 八艾云 版权所有 中山市八艾云计算有限公司 粤ICP备14095776号