Skip to content
0

一键DD纯净系统脚本 CentOS/Debian/Ubuntu

1 序言

基本所有的 VPS 服务器商家,都会提供免费的 Linux 系统供安装,比如 CentOS、Debian、Ubuntu 等。那为什么还要使用一键 DD 脚本重装/更换系统呢?

  • 商家提供的系统版本有限,可能没有自己需要的版本。
  • 商家的系统安装有自己不想要的服务,比如国内的阿里云盾(安骑士)。
  • 商家的系统无法安装特定软件,比如很挑内核的锐速。

以上几种情况,一键 DD 脚本就可以为服务器更换一个纯净的系统,帮你解决问题。

2 所需环境

以网络流传较广的 Vicer 一键 DD 为例,其所需环境为:

架构:KVM/XEN,不支持OpenVZ。 系统:Debian/Ubuntu/CentOS

3 一键 DD 脚本使用教程

注意事项:

  • Vicer 脚本目前不支持重装为 CentOS 7系统,支持 CentOS 6.9 以下版本。
  • 重装的系统源自官方发行版。
  • 安装过程全自动进行,无需 VNC 操作,无需进入救援模式。
  • 系统安装完成后的默认用户名为 root,默认密码为: MoeClub.org

4 DD 脚本示例

由于脚本命令中需要写明目标系统版本,所以根据需求不同,最终的运行命令也各不相同。下面提供几个使用范例,可以直接复制使用,也可以将命令中的系统版本替换为其它版本。

4.1 重装为 CentOS

以下命令中的 -c 后面为 CentOS 版本号,-v 后面为 64 位或者 32 位,可根据需求进行替换。

bash
# CentOS 6.10 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -c 6.10 -v 64 -a
# CentOS 6.10 32位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -c 6.10 -v 32 -a

4.2 重装为 Debian

以下命令中的 -d 后面为 Debian 版本号,-v 后面为 64 位或者 32 位,可根据需求进行替换。

bash
# Debian 8 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 8 -v 64 -a
# Debian 9 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 9 -v 64 -a
# Debian 10 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 10 -v 64 -a
# Debian 11 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a
# Debian 12 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 12 -v 64 -a

4.3 重装为Ubuntu

以下命令中的 -u 后面为 Ubuntu 版本号,-v 后面为 64 位或者 32 位,可根据需求进行替换。

bash
# Ubuntu 12.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 12.04 -v 64 -a
# Ubuntu 14.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 14.04 -v 64 -a
# Ubuntu 16.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 16.04 -v 64 -a
# Ubuntu 18.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 18.04 -v 64 -a
# Ubuntu 20.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 20.04 -v 64 -a

5. 关于系统重装过程

运行包含正确系统版本号的脚本后,新系统的安装会自动进行,无需人工干预。

6. 重装系统后更改 root 密码

  • 使用 Putty 以上文提供的默认密码登录,输入以下命令:passwd root
  • 接下来会分两次要求输入新的密码,可以手动输入,也可以在其它位置复制一个密码,然后在 Putty 界面右键点击即可粘贴上去。
  • 注意:输入新密码时并不会直接显示出来,光标也不会移动,这是正常的
  • 再次登录系统时,记得使用新的 root 密码。
最近更新