CentOS8配置网络yum源方法

第一步:备份系统yum源
mkdir /opt/yum.repos.d
mv /etc/yum.repos.d/CentOS-* /opt/yum.repos.d
第二步:安装wget
yum install -y wget

CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

CentOS 8
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
第三步:清除文件并重建元数据缓存

yum clean all
yum makecache

yum update -y (更新系统所有包)

你可能感兴趣的:(CentOS8配置网络yum源方法)