Linux reinstall:一款功能强大的服务器系统一键重装脚本
脚本特色:
1、全自动无人值守安装;
2、支持各主流VPS商家;
3、重装前可预先指定 ssh 密码、端口、固件、镜像源等参数,执行重装命令时,如果未指定密码、端口。重装后的系统默认用户:root,默认端口:22,默认密码:LeitboGi0ro,首次 ssh 机器后请立即修改密码;
4、preseed 过程针对 Debian 做了大量优化,预置常用组件,永久更改 DNS 为 CloudFlare、Google(需进系统后手动安装 resolvconf:echo “N” | apt install resolvconf -y ),vim 支持鼠标终端复制,不同文件类型不同彩色显示,ssh 连接欢迎页面显示系统占用、IP 信息,软件数更新提示;
5、双栈(同时拥有 ipv6 和 ipv4 地址)机型默认优先配置 ipv4 网络,开机后请手动配置 ipv6 网络,针对纯 ipv6 机型的支持正在开发中;
6、对于 Debian 系统,安装时附带的固件源为国外,国内 VPS 连接速度很慢,长时间连接无速度往往会下载失败,可指定 –cdimage ‘cn’,将源切换到国内中科大的,以提高下载速度;
7、安装时避免进入低内存模式(Debian 特有)后需要进行手动配置,导致无法自动化部署安装的内存量检测阈值,256M 以上机型即使安装时进入低内存模式,也可以自动化进行
安装前:
Debian series(Debian/Ubuntu):
apt install xz-utils dnsutils wget file efibootmgr -y
Redhat series(CentOS/Almalinux/Rockylinux/Oraclelinux/Fedora):
yum install xz dnsutils wget file efibootmgr -y
下载脚本,开始安装
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
Debian 9
bash InstallNET.sh -d 9 -v 64 -a
Debian 10
bash InstallNET.sh -d 10 -v 64 -a
Ubuntu 20.04
bash InstallNET.sh -u 20.04 -v 64 -a
开源地址:https://github.com/leitbogioro/Tools
转自:https://hostloc.com/thread-1094336-1-1.html