cd /etc/yum.repos.d/ 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-* #不能用 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo >1.txt mv 1.txt CentOS-Base.repo yum clean all yum makecache yum install wget -y |