阿里云文章:CentOS 8 EOL如何切换源?
备份所有CentOS源:
rename '.repo' '.repo.bak' /etc/yum.repos.d/CentOS*.repo
下载CentOS源(如果curl不存在或者不好用,手动下载源后上传到/etc/yum.repos.d/目录):
curl -o /etc/yum.repos.d/Centos-vault-8.5.2111.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo curl -o /etc/yum.repos.d/epel-archive-8.repo https://mirrors.aliyun.com/repo/epel-archive-8.repo
清理缓存并重新创建缓存(根据自己的需要,也可以不清理):
yum clean all && yum makecache



