Linux 使用脚本一键 DD(重装) 成纯净的 Linux 系统

Linux 使用脚本一键 DD(重装) 成纯净的 Linux 系统

知了小站
2021-02-05 / 5 评论 / 6,061 阅读

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

  1. 商家提供的系统版本有限,可能没有自己需要的版本;
  2. 商家提供的系统大多都是改装过的,不纯净,可能存在软件兼容行问题;
  3. 商家提供的系统大多带有监控,虽说可以卸载,但是心里总是有疙瘩;

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

一键安装Linux系统

下列脚本支持系统重置为 CentOS 7、CentOS 6、Debian 9、Debian 10、ubuntu 18.10。注意有些脚本需要获取 IP、网关、子网掩码等信息,需要填写正确才行安装成功。

注意重装有风险,可能导致无法开机,谨慎操作!

使用脚本前最好先安装如下软件

# CentOS 与 RedHat
yum install -y xz openssl gawk file wget

# Debian 与 Ubuntu
apt-get install -y xz-utils openssl gawk file
安装 CentOS
wget --no-check-certificate -qO AutoDD.sh 'http://git.io/autodd.sh' && bash AutoDD.sh

krx917bp.png

安装 Debian
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod a+x InstallNET.sh

# 安装 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/'
安装 Ubuntu
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod a+x InstallNET.sh

# 安装ubuntu 18.10 64位
bash InstallNET.sh -u 18.10 -v 64 -a --mirror 'http://archive.ubuntu.com/ubuntu/'
国内可使用
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod a+x InstallNET.sh

bash InstallNET.sh -d 9 -v 64 -a --mirror 'https://mirrors.huaweicloud.com/debian/'

bash InstallNET.sh -d 9 -v 64 -a --mirror 'https://mirrors.aliyun.com/debian/'

bash InstallNET.sh -d 9 -v 64 -a --mirror 'https://mirrors.cloud.tencent.com/debian/'
安装时指定密码
# 所有脚本都可以加入参数 -p 来设置默认密码,如:

bash InstallNET.sh -d 9 -v 64 -p 123456 -a --mirror 'https://mirrors.cloud.tencent.com/debian/'

安装后默认端口: 22
安装后默认用户名: root
安装后默认密码: MoeClub.org

本文共 308 个字数,平均阅读时长 ≈ 1分钟
9

打赏

评论 (5)

取消
  1. 头像
    dc
    Android · Google Chrome

    有没有Rocky linux的dd脚本?

    回复
  2. 头像
    qwq
    Windows 10 · Google Chrome

    用不了 国内机

    回复
    1. 头像
      知了小站 作者
      MacOS · Google Chrome
      @ qwq

      重置 centos 还是 debian 用不了。
      我使用一直是正常的

      回复
      1. 头像
        泡泡
        Android · Google Chrome
        @ 知了小站

        装debian不用了,提示Error! Not Found grub.

        回复
        1. 头像
          知了小站 作者
          MacOS · Google Chrome
          @ 泡泡

          有些厂商的初始系统DD时是会出现这个问题, Error! Not Found grub。

          网上搜下怎么解决就行。或者在平台上换个别的系统,然后再 DD

          回复