一般来说,VPS主机商都已经提供了相应的Linux和Windows操作系统,但是由于各种原因,VPS商家的操作系统ISO可能是经过“改装”过的,例如Linode、阿里云VPS、腾讯云VPS、Vultr等提供的Linux系统就是“改良”过的,会导内核版本与软件不兼容的问题。
这篇文章就来分享另一个在Linux VPS主机上一键安装纯净Debian/Ubuntu/CentOS和全自动DD安装 Windows操作系统的脚本,Linux的ISO建议直接到官网上下载,而Windows由于版权的问题一般来说可以使用热心网友制作的DD包,不过不建议用于生产环境。
一、脚本安装Linux系统:
1. 一键安装脚本
使用Debian/Ubuntu/CentOS 网络安装/网络重装/纯净安装 一键脚本需要注意的事项:
能够全自动重装Debian/Ubuntu/CentOS等系统. 全自动安装默认root密码: MoeClub.org
安装完成后请立即更改密码.
全自动安装CentOS时默认提供VNC功能,可使用VNC Viewer查看进度,VNC端口为1或者5901,可自行尝试连接.(成功后VNC功能会消失.)
目前CentOS系统只支持任意版本重装为 CentOS 6.x 及以下版本. 特别注意:OpenVZ构架不适用.
脚本下载及说明
#Debian/Ubuntu:
apt-get update
#RedHat/CentOS:
yum update
#确保安装了所需软件:
#Debian/Ubuntu:
apt-get install -y xz-utils openssl gawk file
#RedHat/CentOS:
yum install -y xz openssl gawk file
#下载及说明:
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 为提示.
#安装debian9 (-firmware 额外驱动支持)
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 9 -v 64 -a -firmware
#安装ubuntu16.04 (-firmware 额外驱动支持)
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 16.04 -v 64 -a -firmware
#安装ubuntu18.10 (-firmware 额外驱动支持)
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 18.10 -v 64 -a -firmware
#备用
https://do.wzfou.net/shell/InstallNET.sh
高级用法示例
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 9 -v 64 -a -firmware -p mima.123
#使用默认镜像全自动安装
bash InstallNET.sh -d 8 -v 64 -a
#使用自定义镜像全自动安装
bash InstallNET.sh -c 6.10 -v 64 -a --mirror 'http://mirror.centos.org/centos'
# 以下示例中,将X.X.X.X替换为自己的网络参数.
# --ip-addr :IP Address/IP地址
# --ip-gate :Gateway /网关
# --ip-mask :Netmask /子网掩码
#使用自定义镜像全自动安装
bash InstallNET.sh -u 9 -v 64 -a --mirror 'http://mirrors.ustc.edu.cn/debian/'
#使用自定义镜像自定义网络参数全自动安装
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/onedrive/IMAGE/Windows/win7emb_x86.tar.gz'
#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像(调用文件ID的方式)
bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd "https://image.moeclub.org/GoogleDrive/1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J"
#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像
bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd "https://image.moeclub.org/GoogleDrive/1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J"
#国内推荐使用USTC源
--mirror 'http://mirrors.ustc.edu.cn/debian/'
2. 安装CentOS
Linux VPS一键安装CentOS 6、CentOS 7命令如下:
#全自动安装CentOS 6.10 64位
bash InstallNET.sh -c 6.10 -v 64 -a --mirror 'http://mirror.centos.org/centos'
#全自动安装CentOS 7 64位(目前该脚本不支持)
bash InstallNET.sh -c 7 -v 64 -a --mirror 'http://mirror.centos.org/centos'
3. 安装Debian
Linux VPS一键安装debian 8、debian 9、debian 10命令如下:
#全自动安装debian 8 64位
bash InstallNET.sh -d 8 -v 64 -a --mirror 'http://mirrors.ustc.edu.cn/debian/'
#全自动安装debian 9 64位
bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://mirrors.ustc.edu.cn/debian/'
#全自动安装debian 10 64位
bash InstallNET.sh -d 10 -v 64 -a --mirror 'http://mirrors.ustc.edu.cn/debian/'
4. 安装Ubuntu
Linux VPS一键安装ubuntu 16、ubuntu 18命令如下:
#全自动安装ubuntu 16.10 64位
bash InstallNET.sh -d 16.10 -v 64 -a --mirror 'http://archive.ubuntu.com/ubuntu/'
#全自动安装ubuntu 18.10 64位
bash InstallNET.sh -u 18.10 -v 64 -a --mirror 'http://archive.ubuntu.com/ubuntu/'
二、一键安装CentOS 7:
上面的脚本暂时未支持一键安装CentOS 7(截止2019年8月作者暂未更新),我们可以使用以下命令来安装:
然后我们就可以选择CentOS7/Debian9/Ubuntu16.04系统。
三、一键安装Windows:
在 Linux VPS 上一键全自动 dd 安装 Windows 系统脚本需要注意的地方如下:
远程登陆账号为: Administrator
远程登陆密码为: Vicer
仅修改了主机名,可放心使用.(建议自己制作.)
使用的公用网盘,如需长期/大量使用此包请自行备份.
1. 安装Windows 7
一键安装Windows 7的命令如下:
## 一般自带
#RedHat/CentOS
yum install glibc-common
#在你的机器上全新安装,如果你有VNC,可以看到全部过程.
#在dd的过程中,会卡在分区的界面上,不会走进度条.完成后将会自动重启.
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && bash InstallNET.sh -dd 'https://moeclub.org/onedrive/IMAGE/Windows/win7emb_x86.tar.gz'
#win7emb_x86.tar.gz使用的是Windows Embedded Standard 7(Thin PC)作为底包,官方精简.
#也可以指定网络参数来安装
# 将X.X.X.X替换为自己的网络参数.
# --ip-addr :IP Address/IP地址
# --ip-mask :Netmask /子网掩码
# --ip-gate :Gateway /网关
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && bash InstallNET.sh --ip-addr X.X.X.X --ip-mask X.X.X.X --ip-gate X.X.X.X -dd 'https://moeclub.org/onedrive/IMAGE/Windows/win7emb_x86.tar.gz'
安装完了Windows后,你可能要用的命令有:
::以管理员身份运行CMD::
::更改用户的密码
net user [用户名] [密码]
::激活 Administrator 账户
net user Administrator /active:yes
::设置 Administrator 账户密码
net user Administrator [新密码]
::添加用户
net user [用户名] [密码] /add
::将用户添加至 Administrator 组
net localgroup Administrators [用户名] /add
::删除用户
net user [用户名] /del
2. 安装其它Windows
如果你有自己的Windows的DD包,可以使用以下命令来安装:
四、Windows DD镜像:
这里分享几个Windows DD镜像包,由于是网友制作,在使用过程中请注意安全问题。
http://down.80host.com/iso/dd/WS2008R2Enterprise-Joodle-Template.gz
http://down.80host.com/iso/dd/Windows2012R2-Joodle-Template.gz
Username:Administrator
Password:Password147
http://down.80host.com/iso/dd/Windows7-Joodle-Template.gz
http://down.80host.com/iso/dd/Windows8.1-Joodle-Template.gz
Username:Admin
Password:Password147
http://down.80host.com/iso/dd/7.ENT.EVAL.64.VIRTIO-SCSI.gz
Username:WhatUpTime.com
Password:[email protected]
http://down.80host.com/iso/dd/win7_cn_5gb_virtio_scsi.gz
Username:administrator
Password:www.80host.com
#支持OVH VPS的scsi磁盘驱动,其他viostor的DD包在上面会蓝屏
http://down.80host.com/iso/dd/win7_cn_5gb_virtio_scsi_faster.gz
Username:administrator
Password:www.80host.com
#支持OVH VPS的scsi磁盘驱动,其他viostor的DD包在上面会蓝屏
http://down.80host.com/iso/dd/Kimsufi2003.gz
Username:Administrator
Password:password!yxz.me
http://down.80host.com/iso/dd/win2003_with_update.gz
Username:administrator
Password:80hostkvmlamjj
http://down.80host.com/iso/dd/ikoula92.gz
Username:administrator
Password:Abcd123400
#Laiboke.com制作的中文版2012R2
http://down.80host.com/iso/dd/Win2012R2ZW.gz
Username:Administrator
Password:Laiboke.com
/账号: Administrator
/密码: Vicer
#Windows Embedded 8.1 Industry Pro x64 (2.87G;KVM;XEN;Hyper-V;未激活)
https://moeclub.org/get-win8embx64-auto
#备用地址
https://down.moerats.com/Windows/win8embx64-auto.gz
# 谷歌文件ID: 1srhylymTjYS-Ky8uLw4R6LCWfAo1F3s7
# 该包只添加了VirtIO驱动,理论上仅能在KVM,Hyper-V构架下正常运行.
# 如需在其他虚拟化构架下运行,请自行添加相关虚拟化驱动.
#使用的是Windows Embedded Standard 7(Thin PC)作为底包,官方精简
https://moeclub.org/onedrive/IMAGE/Windows/win7emb_x86.tar.gz
#镜像具备以下特点
#1,集成 virtio 驱动以及 Intel 的网卡驱动,因此适用于大部分 KVM 的 VPS 以及 Kimsufi 服务器
#2,无需 VNC 交互直接无人值守安装,DD 完成即可远程登录桌面
#3,基于 VOL 版制作,因此可用 KMS 方式激活系统
#4,关闭 Ctrl + Alt + Del 快捷键登录方式
#5,关闭服务器管理器开机自启动
#6,关闭 IE 安全增强配置
#7,开启 Windows 远程桌面
#8,关闭 Windows 自带防火墙
#9,其他基于 Dism++ 自带的一些系统优化,如去掉快捷方式小箭头等
/用户名: administrator
/密码: Password147
https://delivery.yuntu.moe/teddysun/cn_windows2019.gz
https://delivery.yuntu.moe/teddysun/en_windows2019.gz
https://delivery.yuntu.moe/teddysun/cn_windows2016.gz
https://delivery.yuntu.moe/teddysun/en_windows2016.gz
https://delivery.yuntu.moe/teddysun/cn_windows2012r2.gz
https://delivery.yuntu.moe/teddysun/en_windows2012r2.gz
五、系统脚本大集合:
VPS主机一键DD安装Windows、Centos、Ubuntu、Debian系统脚本大集合,集合了Linux和WIN包:
Linux:centos6、7; Ubuntu 14 16 18;Debian 7 8 9 10;
Windows:集合了 “萌咖大佬、老司机、MeowLove” 的系统,
包含win7 2003 2006 2012 2008 2016 2019等系统。当然也可以自定义。
命令如下:
wget -N --no-check-certificate https://raw.githubusercontent.com/veip007/dd/master/dd-od.sh && chmod +x dd-od.sh && ./dd-od.sh
##镜像文件在GoogleDrive
wget -N --no-check-certificate https://raw.githubusercontent.com/veip007/dd/master/dd-gd.sh && chmod +x dd-gd.sh && ./dd-gd.sh
接下来会让你选择安装的系统:
1) CentOS 7 (DD) 用户名:root 密码:[email protected]
2) CentOS 6 (阿里云镜像) 用户名:root 密码:MoeClub.org
3) CentOS 6 用户名:root 密码:MoeClub.org
4) Debian 7 x32 用户名:root 密码:MoeClub.org
5) Debian 8 x64 用户名:root 密码:MoeClub.org
6) Debian 9 x64 用户名:root 密码:MoeClub.org
7) Debian 10 x64 用户名:root 密码:cxthhhhh.com
8) Ubuntu 14.04x64 用户名:root 密码:MoeClub.org
9) Ubuntu 16.04x64 用户名:root 密码:MoeClub.org
10) Ubuntu 18.04x64 用户名:root 密码:MoeClub.org
11) 萌咖Win7x64 用户名:Administrator 密码:Vicer
12) Win2019 By:MeowLove 密码:cxthhhhh.com
13) Win2016 By:MeowLove 密码:cxthhhhh.com
14) Win2012 R2 By:MeowLove 密码:cxthhhhh.com
15) Win2008 R2 By:MeowLove 密码:cxthhhhh.com
16) Windows 7 Vienna By:MeowLove 密码:cxthhhhh.com
17) Windows 2003 Vienna By:MeowLove 密码:cxthhhhh.com
18) Win7x32 By:老司机 用户名:Administrator 密码:Windows7x86-Chinese
19) Win-2003x32 By:老司机 用户名:Administrator 密码:WinSrv2003x86-Chinese
20) Win2008x64 By:老司机 用户名:Administrator 密码:WinSrv2008x64-Chinese
21) Win2012R2x64 By:老司机 用户名:Administrator 密码:WinSrv2012r2
22) CentOS 8 用户名:root 密码:cxthhhhh.com 推荐512M以上使用
自定义安装请使用:bash InstallNET.sh -dd '您的直连'
请输入编号:
六、阿里云专用DD脚本:
适用于阿里云轻量和ECS,脚本命令如下:
#Debian/Ubuntu:
apt-get install -y xz-utils openssl gawk file
apt-get update
#RedHat/CentOS:
yum install -y xz openssl gawk file
yum update
Linux用户名:root
Windows用户名:Administrator
默认密码 cxthhhhh.com
#一键网络重装纯净 CentOS 8
bash Network-Reinstall-System-Modify.sh -CentOS_8
#一键网络重装纯净CentOS 7
bash Network-Reinstall-System-Modify.sh -CentOS_7
#一键网络重装纯净CentOS 6
bash Network-Reinstall-System-Modify.sh -CentOS_6
#一键网络重装纯净Debian 9
bash Network-Reinstall-System-Modify.sh -Debian_9
#一键网络重装纯净Debian 8
bash Network-Reinstall-System-Modify.sh -Debian_8
#一键网络重装纯净Debian 7
bash Network-Reinstall-System-Modify.sh -Debian_7
#一键网络重装纯净Ubuntu 18.04
bash Network-Reinstall-System-Modify.sh -Ubuntu_18.04
#一键网络重装纯净Ubuntu 16.04
bash Network-Reinstall-System-Modify.sh -Ubuntu_16.04
#一键网络重装纯净Ubuntu 14.04
bash Network-Reinstall-System-Modify.sh -Ubuntu_14.04
#一键网络重装纯净Windows Server 2019
bash Network-Reinstall-System-Modify.sh -Windows_Server_2019
#一键网络重装纯净Windows Server 2016
bash Network-Reinstall-System-Modify.sh -Windows_Server_2016
#一键网络重装纯净Windows Server 2012 R2
bash Network-Reinstall-System-Modify.sh -Windows_Server_2012R2
#一键网络重装纯净Windows Server 2008 R2
bash Network-Reinstall-System-Modify.sh -Windows_Server_2008R2
#一键网络重装纯净Windows 7
bash Network-Reinstall-System-Modify.sh -Windows_7_Vienna
#一键网络重装纯净Windows Server 2003
bash Network-Reinstall-System-Modify.sh -Windows_Server_2003
七、总结:
经过测试,自己使用一键脚本安装Debian/Ubuntu/CentOS或者Windows系统最好找一个IO读写速度快的VPS,否则很容易出现卡死的情况。关于各大VPS的对比可以参考这篇汇总表格:VPS主机排行榜单。
一般来说安装一个纯净版本的Debian/Ubuntu/CentOS或者Windows系统需要半个小时左右,DD包Windows是无人值守,全过程自动安装,而Linux的ISO从官网下载,需要自己手动进入VNC操作界面安装。