在Linux主机上安装纯净Debian/Ubuntu/CentOS/Windows操作系统的脚本
bin456789
leitbogioro
海外
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
国内Gitee
wget --no-check-certificate -qO InstallNET.sh 'https://gitee.com/mb9e8j2/Tools/raw/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
默认安装
Debian
bash InstallNET.sh -debian 11/12
root
#默认登陆用户名LeitboGi0ro
#默认密码22
#默认ssh端口
Windows
bash InstallNET.sh -dd "https://dl.lamp.sh/vhd/cn_win2019.xz"
bash InstallNET.sh -dd "https://dl.lamp.sh/vhd/zh-cn_win2022.xz"
Administrator
#默认用户Teddysun.com
#默认密码
更多winsows 系统可以查看秋水制作的镜像 https://dl.lamp.sh/vhd/
自定义安装
bash InstallNET.sh -debian/ubuntu/centos/almalinux/rockylinux/fedora(OS Type) 11(OS Version) -version 64(OS Bit) -port "your server port" -pwd "your server password" -mirror "a valid url for linux image source" -dd/--image "dd image url" -filetype "gz or xz" -timezone "like Asia/Tokyo etc" --dhcp-static/--ip-addr 'x.x.x.x'(ip address) --ip-mask 'x.x.x.x'(subnet mask) --ip-gate 'x.x.x.x'(gateway) -firmware(Debian with hardware drivers)
脚本常用自定义参数:
-port ""
#您可以预先指定系统的ssh端口,范围是1~65535,Redhat 系列或 Debian 系列都可以支持,默认为端口'22'。
-pwd ''
#您可以预先指定系统的ssh密码,Redhat 系列或 Debian 系列都可以支持,默认为'LeitboGi0ro'。
-dd/--image "DD image from a valid url"
#该参数用于KVM或XEN虚拟化平台的DD模式,当前操作系统必须是Debian系列
-filetype "gz/xz"
#确定DD文件类型,不仅支持".gz"(默认),也支持".xz"。
-timezone "like Asia/Shanghai etc"
#这意味着手动分配时区,如果您使用代理连接到您的机器,然后执行 "InstallNET.sh",自动时区配置在这种情况下可能不适合您。
-raid "0"
#只适用于raid 0磁盘分区,如果您的机器只有一个硬盘,就不要指定它了
--network "dhcp/auto" or "static/manual"
#默认使用DHCP来完成网络配置。如果您的云服务提供商中小型厂商,您的机器的网络可能是静态的,所以您需要添加它。它相当于添加 --ip-addr "" --ip-mask "" --ip-gate "",如果您添加了这个,就不要再分配下面的三项内容了! 它必须加在命令的最后。
--ip-addr "IPv4地址": 它必须与--ip-gate和--ip-mask一起添加,如果您已经添加了--dhcp-static,就不要再分配它了!
--ip-gate "IPv4网关": 它必须与--ip-addr和--ip-mask一起添加,如果您已经添加了--dhcp-static,就不要再指定它了!
--ip-mask "IPv4子网musk": 它必须与--ip-addr和--ip-gate一起添加,如果您已经添加了--dhcp-static,就不要再分配它了!
--ip-dns "IPv4 DNS服务器": 这个只适用于静态网络配置,默认是1.0.0.1,您也可以改变其他的IPv4 dns服务器,如8.8.8.8,9.9.9.9,4.4.2.2等来代替它。如果您的机器的网络是DHCP的,就不要分配了!
-firmware
#为Debian指定支持旧硬件的驱动程序,如果您的服务器在中国大陆,程序将切换到 "中国科学技术大学(https://mirrors.ustc.edu.cn/debian-cdimage/) "的镜像,以便更快地下载,默认镜像来自http://cdimage.debian.org/cdimage/。
-version 32/i386 or 64/amd64 or arm/arm64
#指定是32位还是64位操作系统。程序会自动检测并将您的机器的CPU架构重定向到将要安装的新系统上,如果您对它不了解,就不要分配它了!
-mirror "a valid DIST mirror url"
#指定一个源镜像地址,以加快 Linux 安装速度
推荐镜像源
https://meledee.com/2022/12/4112.html #包含国内知名镜像站
https://www.debian.org/mirror/list.html #Debian
https://launchpad.net/ubuntu/+cdmirrors #Ubuntu
https://www.centos.org/download/mirrors/ #CentOS 7 / 8-stream
https://admin.fedoraproject.org/mirrormanager/mirrors/CentOS #CentOS 9-stream
https://mirrors.almalinux.org/ #AlmaLinux
https://mirrors.rockylinux.org/mirrormanager/mirrors #Rocky Linux
https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora #Fedora
beta.gs
来源
支持甲骨文
海外服务器
wget --no-check-certificate -O NewReinstall.sh https://raw.githubusercontent.com/fcurrk/reinstall/master/NewReinstall.sh && chmod a+x NewReinstall.sh && bash NewReinstall.sh
国内服务器
wget --no-check-certificate -O NewReinstall.sh https://cdn.jsdelivr.net/gh/fcurrk/reinstall@master/NewReinstall.sh && chmod a+x NewReinstall.sh && bash NewReinstall.sh
系统密码
1、CentOS 7.7 (已关闭防火墙及SELinux,默认密码Pwd@CentOS)
2、CentOS 7 (默认密码cxthhhhh.com)
3、CentOS 7 (支持ARM64、UEFI,默认密码cxthhhhh.com)
4、CentOS 8 (默认密码cxthhhhh.com)
5、Rocky 8 (默认密码cxthhhhh.com)
6、Rocky 8 (支持UEFI,默认密码cxthhhhh.com)
7、Rocky 8 (支持ARM64、UEFI,默认密码cxthhhhh.com)
8、CentOS 9 (默认密码cxthhhhh.com)
9、CentOS 6 (官方源原版,默认密码Minijer.com)
10、Debian 11 (官方源原版,默认密码Minijer.com)
11、Debian 10 (官方源原版,默认密码Minijer.com)
12、Debian 9 (官方源原版,默认密码Minijer.com)
13、Debian 8 (官方源原版,默认密码Minijer.com)
14、Ubuntu 20.04 (官方源原版,默认密码Minijer.com)
15、Ubuntu 18.04 (官方源原版,默认密码Minijer.com)
16、Ubuntu 16.04 (官方源原版,默认密码Minijer.com)
17、Windows Server 2022 (默认密码cxthhhhh.com)
18、Windows Server 2022 (支持UEFI,默认密码cxthhhhh.com)
19、Windows Server 2019 (默认密码cxthhhhh.com)
20、Windows Server 2016 (默认密码cxthhhhh.com)
21、Windows Server 2012 (默认密码cxthhhhh.com)
22、Windows Server 2008 (默认密码cxthhhhh.com)
23、Windows Server 2003 (默认密码cxthhhhh.com)
24、Windows 10 LTSC (默认密码Teddysun.com)
25、Windows 10 LTSC (支持UEFI,默认密码Teddysun.com)
26、Windows 7 x86 Lite (默认密码nat.ee)
27、Windows 7 x86 Lite (阿里云专用,默认密码nat.ee)
28、Windows 7 x64 Lite (默认密码nat.ee)
29、Windows 7 x64 Lite (支持UEFI,默认密码nat.ee)
30、Windows 10 LTSC Lite (默认密码nat.ee)
31、Windows 10 LTSC Lite (阿里云专用,默认密码nat.ee)
32、Windows 10 LTSC Lite (支持UEFI,默认密码nat.ee)
33、Windows Server 2003 Lite (C盘默认10G,默认密码WinSrv2003x86-Chinese)
34、Windows Server 2008 Lite (默认密码nat.ee)
35、Windows Server 2008 Lite (支持UEFI,默认密码nat.ee)
36、Windows Server 2012 Lite (默认密码nat.ee)
37、Windows Server 2012 Lite (支持UEFI,默认密码nat.ee)
38、Windows Server 2016 Lite (默认密码nat.ee)
39、Windows Server 2016 Lite (支持UEFI,默认密码nat.ee)
40、Windows Server 2022 Lite (默认密码nat.ee)
41、Windows Server 2022 Lite (支持UEFI,默认密码nat.ee)
99、自定义镜像
注意事项
系统名称后带Lite的均为精简版,没有的是完整版.
[X64-Legacy-cxthhhhh]代表系统为AMD64位,支持传统BIOS启动,cxthhhhh定制的系统镜像.
ARM64代表系统支持ARM64位
UEFI代表系统支持最新的UEFI启动,如甲骨文全部都是这种
aliyun代表阿里云专用系统镜像
cxthhhhh、teddysun、nat.ee均为三位制作系统镜像的大佬代称
系统密码会在选择相应序号后提示,请注意记录。
经测试在谷歌云原版系统基础上DD会出现自动获取的子网掩码为255.255.255.255,如出现这种情况需要手工输入改正为正确的如255.255.255.0,否则会安装完成主机可能会离线。
阿里云因使用了特殊的驱动,DD安装Windows系统选择阿里云专用版。
Oracle Cloud(甲骨文云)可选择支持UEFI的镜像,注意基础系统最好选择Ubuntu,如原系统是CentOS可能无法成功,注意如是ARM机器注意选择同时支持ARM64和UEFI的镜像。
9-16项安装原版系统,可自定义密码,密码要求8-16位,以英文字母或数字开头,可以是大小写英文字母、数字及7个特殊字符.!$@#&%的任意组合。
报错Error! grub.cfg.解决办法
mkdir /boot/grub2 && grub-mkconfig -o /boot/grub2/grub.cfg