CentOS8 配置其他yum源

Xy718 472 2023-05-25

备份并删除

# 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

#删除旧的配置文件
rm -rf /etc/yum.repos.d/*.repo

下载阿里云yum源repo

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
#or
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum makecache

冶心·练体·得技