一、配置yum
1、查看看是否存在yum
[root@localhost ~]# rpm -qa|grep yum
yum-langpacks-0.4.2-7.el7.noarch
yum-3.4.3-168.el7.centos.noarch
PackageKit-yum-1.1.10-2.el7.centos.x86_64
yum-utils-1.1.31-54.el7_8.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch
2、备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3、下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/
阿里云yum(2024最新yum:https://developer.aliyun.com/mirror/)
centos 8
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
或
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
4、清除缓存
yum clean all
5、新建缓存
yum makecache
6、更新yum
yum -y update
标签:CentOS,repos,配置,repo,etc,Base,yum,CentOS8
From: https://www.cnblogs.com/guarderming/p/18429577