problem:
Have a Huawei host, configure Huawei cloud mirrors, and do not use public network traffic to accelerate the experience
system:
centos7.6
solve:
01, Huawei cloud mirrors
https://mirrors.huaweicloud.com/
cd /etc/yum.repos.d && rm -rf * //Clean up existing yum sources
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo //Download Huawei mirrors
02, add epel source
yum remove -y epel-release
yum install -y https://repo.huaweicloud.com/epel/epel-release-latest-7.noarch.rpm
cd /etc/yum.repo.d/
rm -rf epel-testing.repo
sed -i "s/#baseurl/baseurl/g" /etc/yum.repos.d/epel.repo
sed -i "s/mirrorlist/#mirrorlist/g" /etc/yum.repos.d/epel.repo
sed -i "s@http://download.fedoraproject.org/pub@https://repo.huaweicloud.com@g" /etc/yum.repos.d/epel.repo
03, clean cache test
yum clean all //Clear the original yum cache
yum makecache //Refresh cache
yum repolist all //View all the files that can be used by the configuration, and the cache will be automatically refreshed
Reprinted at: https://www.cnblogs.com/xiaochina/p/11478098.html