1、进入yum的repos目录
cd /etc/yum.repos.d/
2、修改所有的CentOS文件内容文章源自爱尚资源教程网-https://www.23jcw.net/1753.html
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
3、更新yum源为阿里镜像文章源自爱尚资源教程网-https://www.23jcw.net/1753.html
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo yum clean all yum makecache
4、yum安装测试是否可以yum安装文章源自爱尚资源教程网-https://www.23jcw.net/1753.html
yum install wget –y文章源自爱尚资源教程网-https://www.23jcw.net/1753.html文章源自爱尚资源教程网-https://www.23jcw.net/1753.html
相关文章
版权声明:文章图片资源来源于网络,如有侵权,请留言删除!!!