featured-image

centos8-stream更换华为云yum源

1、备份默认的repo文件

# cd /etc/yum.repos.d/
# mkdir backup
# mv *.repo backup/

4、更换为华为云的yum源

创建新文件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

软件源列表

Copyright © 2014 - 2021 創雲信息科技(國際)電信集團 All Rights Reserved