LinuxMirrors: GNU/Linux 一键更换系统软件源脚本 (gitee.com)
命令:
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
执行如果报错请先进入yum配置文件目录移动之前的旧文件,也就是以下三条命令
cd /etc/yum.repos.d/
mkdir bak
mv *.repo bak/
在执行完之后关闭扩展源检查,否则安装部分软件会报错
sed -i ‘s/gpgcheck=1/gpgcheck=0/’ /etc/yum.repos.d/epel.repo
gitee项目地址:https://gitee.com/SuperManito/LinuxMirrors