[baseos] name=CentOS-Stream-8 - Base baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/8-stream/BaseOS/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial [appstream] name=CentOS-Stream-8 - AppStream baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/8-stream/AppStream/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
注意:需要将将文件夹(/etc/yum.repos.d/)下的其他文件全部删掉,只保留一个(CentOS-Base.repo)即可,不然会走一些其他的额外配置