下文主要目的就是爲了將鏡像列表弄成阿裡雲的。防止豺狼有機可乘。
1、進入yum的repos目錄
cd /etc/yum.repos.d/
2、修改所有的CentOS文档内容
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-*
更新yum源爲阿裡鏡像
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
yum安裝測試是否可以yum安裝
yum install wget –y