yum mirror relocate - wwwxuebin/linuxGo GitHub Wiki

wget http://mirrors.163.com/centos/7.6.1810/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm wget http://mirrors.163.com/centos/7.6.1810/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm wget http://mirrors.163.com/centos/7.6.1810/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm

rpm -ivh yum-*

mv /etc/yum.repos.d /etc/yum.repos.d.backup mkdir /etc/yum.repos.d

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

mv CentOS7-Base-163.repo /etc/yum.repos.d vi CentOS7-Base-163.repo

:%s/$releaser/$version/g

yum clean all yum makecache