一、CentOS8 配置yum源文件

1. 备份

mkdir /etc/yum.repos.d/repo.bak
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo.bak

2. 配置yum源文件
vim /etc/yum.repos.d/CentOS8.repo

     [baseOS]
	name=baseOS
	baseurl=https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/
			https://mirrors.huaweicloud.com/centos/8/BaseOS/x86_64/os/
			https://mirrors.163.com/centos/8/BaseOS/x86_64/os/
	gpgcheck=1
	gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

	[AppStream]
	name=AppStream
	baseurl=https://mirrors.aliyun.com/centos/8/AppStream/x86_64/os/
			https://mirrors.huaweicloud.com/centos/8/AppStream/x86_64/os/
			https://mirrors.163.com/centos/8/AppStream/x86_64/os/
	gpgcheck=1
	gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official


	[epel]
	name=epel
	baseurl=https://mirrors.aliyun.com/epel/8/Everything/x86_64/
	gpgcheck=1
	gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-8

	[extras]
	name=extras
	baseurl=https://mirrors.aliyun.com/centos/8/extras/x86_64/os/
	gpgcheck=1
	gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

版权声明:本文为sunyonglwll原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/sunyonglwll/p/14044807.html