1:查看当前yum源:
yum repolist
2:更换yum源
2-1:备份原yum源
cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2-2:下载华为云yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo
2-3:清理原yum源缓存
yum clean all
2.4:建立元数据
yum makecache