btpanel 发表于 2024-7-31 15:45:33

一键更换系统镜像源脚本工具

简单介绍
由于centos7等系统EOL,但仍有不少业务运行在这些旧系统之上。
希望这个工具可以方便大家切换镜像源。
由于时间精力有限,暂时只做了centos EOL系统的脚本,其他的后续慢慢补齐。

演示截图
https://free-img.400040.xyz/4/2024/07/31/66a9d905d3af5.png

脚本特性
1.自动测速,选择最快的镜像源地址。
2.一键换源,一键执行自动切换。

补充说明
1.旧镜像配置文件均备份在 脚本所在目录/mirror_sources/ 目录下
2.执行yum -y update命令后,配置文件会被恢复到官方源,需要再次执行脚本修改源配置文件。

脚本命令
该脚本目前还在开发中,纯小白+生产环境请勿使用。镜像源这东西还没玩透,欢迎各位大佬提建议。
使用curl命令下载执行centos_7换源脚本
```shell-session
curl --insecure -sSL -o centos_7.sh https://down.baota.me/project/mirror_sources/script/centos_7.sh && bash centos_7.sh
```
使用curl命令下载执行centos_8换源脚本
```shell-session
curl --insecure -sSL -o centos_8.sh https://down.baota.me/project/mirror_sources/script/centos_8.sh && bash centos_8.sh
```
使用curl命令下载执行centos_stream_8换源脚本
```shell-session
curl --insecure -sSL -o centos_stream_8.sh https://down.baota.me/project/mirror_sources/script/centos_stream_8.sh && bash centos_stream_8.sh
```

第一时间更新将会在我的博客中发布,欢迎光临我的小栈。
https://www.baota.me/post-450.html

卡尔 发表于 2024-7-31 16:06:04

不错的教程,感谢分享!{:5_150:}
页: [1]
查看完整版本: 一键更换系统镜像源脚本工具