# cd /etc/yum.repos.d/
# mkdir backup
# mv *.repo backup/
创建新文件huaweiyun-Centos-Stream-8.repo
# touch huaweiyun-Centos-Stream-8.repo
把以下配置拷贝到huaweiyun-Centos-Stream-8.repo
[BaseOS]
name=BaseOS
baseurl=https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/
enabled=1
gpgcheck=0
[Appstream]
name=Appstream
baseurl=https://repo.huaweicloud.com/centos/8-stream/AppStream/x86_64/os/
enabled=1
gpgcheck=0
[Extras]
name=Extras
baseurl=https://repo.huaweicloud.com/centos/8-stream/extras/x86_64/os/
enabled=1
gpgcheck=0
[PowerTools]
name=PowerTools
baseurl=https://repo.huaweicloud.com/centos/8-stream/PowerTools/x86_64/os/
enabled=1
gpgcheck=0
之后清理并更新yum软件源
清理列表
# yum clean all
更新新的yum软件源列表
# yum makecache
软件源列表