# cat /etc/redhat-release

image.png

# cd /etc/yum.repos.d

# vim CentOS-AppStream.repo

baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/

image.png

# vim CentOS-Base.repo

baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/

CentOS 8.0配置阿里云yum源和epel源_第1张图片

# vim CentOS-Extras.repo

baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/

CentOS 8.0配置阿里云yum源和epel源_第2张图片

# dnf -y install epel-release

# dnf clean all

# dnf makecache

# dnf repolist

image.png