DD纯净系统脚本及bbrp内核脚本
vane 2020-08-09
debian
本章我们学习如何简单快速 DD 一个纯净的系统(CentOS/Debian/Ubuntu),是不是听起来很 nb???
基本所有的 VPS 服务器商家,都会提供免费的 Linux 系统供安装,比如 CentOS、Debian、Ubuntu 等。那为什么还要使用一键 DD 脚本重装/更换系统呢?
- 商家提供的系统版本有限,可能没有自己需要的版本。
- 商家的系统安装有自己不想要的服务,比如国内的阿里云盾(安骑士)。
- 商家的系统无法安装特定软件,比如很挑内核的锐速。
以上几种情况,一键 DD 脚本就可以为服务器更换一个纯净的系统,帮你解决问题。

# 所需环境
以网络流传较广的 Vicer 一键 DD 为例,其所需环境为
架构:KVM/XEN,不支持 OpenVZ。
系统:Debian/Ubuntu/CentOS
# 一键 DD 脚本使用教程
注意事项:
1. Vicer 脚本目前不支持重装为 CentOS 7 系统,支持 CentOS 6.9 以下版本。
2. 重装的系统源自官方发行版。
3. 安装过程全自动进行,无需 VNC 操作,无需进入救援模式。
4. 系统安装完成后的默认用户名为 root,默认密码为: MoeClub.org 或者 ** admin **
# DD 脚本示例
由于脚本命令中需要写明目标系统版本,所以根据需求不同,最终的运行命令也各不相同。
下面提供几个使用范例,可以直接复制使用,也可以将命令中的系统版本替换为其它版本。
# 重装为 CentOS (6.9、7):
以下命令中的 -c 后面为 CentOS 版本号,-v 后面为 64 位/32 位,可根据需求进行替换。
# CentOS 6.9 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -c 6.9 -v 64 -a
# CentOS 6.9 32位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -c 6.9 -v 32 -a
1
2
3
4
5
2
3
4
5
# 重装为 Debian(8、9)10、11 版本直接更改版本号即可:
# Debian 8 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 8 -v 64 -a
# Debian 9 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 9 -v 64 -a
1
2
3
4
5
2
3
4
5
# 重装为 Ubuntu:
# Ubuntu 12.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 12.04 -v 64 -a
# Ubuntu 14.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 14.04 -v 64 -a
# Ubuntu 16.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 16.04 -v 64 -a
# Ubuntu 18.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 18.04 -v 64 -a
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
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 为提示.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 关于系统重装过程
运行包含正确系统版本号的脚本后,新系统的安装会自动进行,无需人工干预。有可能出现的三种情况:
- 正常情况,等待安装完毕即可。
- 如果安装 CentOS 7 版本,会出现下图提示,表示不支持:

- 如果输入了其它不支持或不存在的系统版本,则会出现下图提示,中止安装:

# 重装系统后更改 root 密码
耐心等待系统安装成功后,出于安全考虑,建议立即更改默认密码。具体方法:
- 登录
xshell,输入以下命令:passwd root - 接下来会分两次要求输入新的密码,可以手动输入,也可以在其它位置复制一个密码,然后在 Putty 界面右键点击即可粘贴上去。
注意:输入新密码时并不会直接显示出来,光标也不会移动,这是正常的。 - 再次登录系统时,记得使用新的 root 密码。
# Linux 一键安装常见/最新内核脚本 锐速/BBRPLUS/BBR2
卸载内核
wget -N --no-check-certificate "https://github.000060000.xyz/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
1
或
wget -N "https://github.000060000.xyz/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
1
不卸载内核
wget -N --no-check-certificate "https://github.000060000.xyz/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
1
或
wget -N "https://github.000060000.xyz/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
1
# 设置东八区上海时间
date -R
sudo timedatectl set-timezone Asia/Shanghai
sudo timedatectl set-ntp true
timedatectl status
1
2
3
4
2
3
4
enjoy it!
以上便是本篇教程全部内容,如有疑问,欢迎留言交流
