本文最后更新于 447 天前,其中的信息可能已经有所发展或是发生改变。
注:默认 root 密码为
MoeClub.org
安装依赖
#Debian
apt-get install -y wget curl xz-utils openssl gawk file apt-transport-https ca-certificates
#Centos
yum install -y wget curl xz openssl gawk file
如果失败请运行下面的命令后再试
#Debian
apt-get update
#CentOS
yum update
下载一键脚本
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod a+x InstallNET.sh
然后使用根据提示使用命令
Usage:
bash InstallNET.sh -d/--debian [dist-name]
-u/--ubuntu [dist-name]
-c/--centos [dist-version]
-v/--ver [32/i386|64/amd64]
--ip-addr/--ip-gate/--ip-mask
-apt/-yum/--mirror
-dd/--image
-a/-m
# dist-name:发行版本代号
# dist-version:发行版本号
# -apt/-yum/--mirror:使用定义镜像
# -a/-m:询问是否能进入VNC自行操作。-a 为不提示(一般用于全自动安装),-m 为提示。
例:
#使用默认镜像全自动安装 Debian 11 x64
bash InstallNET.sh -d 11 -v 64 -a
#使用自定义镜像全自动安装 CentOS 8 x64
bash InstallNET.sh -c 8 -v 64 -a --mirror 'http://mirror.centos.org/centos'
高级选项
# 以下示例中,将X.X.X.X替换为自己的网络参数.
--ip-addr x.x.x.x #IP地址
--ip-gate x.x.x.x #网关
--ip-mask x.x.x.x #子网掩码
#使用自定义镜像自定义网络参数全自动安装
bash InstallNET.sh -u 16.04 -v 64 -a --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x --mirror 'http://archive.ubuntu.com/ubuntu'
#使用自定义网络参数全自动dd方式安装
bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd 'https://moeclub.org/get-win7embx86-auto'
#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像(调用文件ID的方式)
bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd "$(echo "11fr_LcgY_qSEDbWvBel0S0fjYAX_lKL0" |xargs -n1 bash <(wget --no-check-certificate -qO- 'https://moeclub.org/get-gdlink'))"
#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像
bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd "$(echo "https://drive.google.com/open?id=11fr_LcgY_qSEDbWvBel0S0fjYAX_lKL0" |xargs -n1 bash <(wget --no-check-certificate -qO- 'https://moeclub.org/get-gdlink'))"