一、查看当前yum源:yum repolist
二、删除原yum源:cd /etc/yum.repos.d && rm -rf *
三、下载华为云yum源 :wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo
四、清理原yum源缓存:yum clean all
五、更新缓存:yum makecache 或者 yum repolist all
阿里云、清华、网易yum源
阿里云:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
清华大学:https://mirrors.tuna.tsinghua.edu.cn/help/centos/ #官网教程
网易:wget http://mirrors.163.com/.help/CentOS6-Base-163.repo