仗剑只为她

仗剑只为她

Linux系統DD一鍵腳本

使用腳本存在一定的風險,謹慎使用。
重統重裝之後,請重新設置密碼。

腳本介紹#

GitHub 地址:GitHub - leitbogioro/Tools

  • 全自動無人值守安裝;
  • 支持各主流 VPS 商家;
  • 系統支持情況:Debian 12、Kali Rolling、Alpine Linux Edge、CentOS 9 stream、AlmaLinux 9、RockyLinux 9、Fedora 38、Ubuntu 22.04、Windows Server 2022

腳本使用#

安裝 wget#

  • Debian 系 (Debian / Ubuntu / Kali):
apt update -y
apt install wget -y
  • RedHat 系,only based on RedHat 7+, grub2 (CentOS / AlmaLinux / RockyLinux / OracleLinux / Fedora / VzLinux / ScientificOS / RedHat Enterprise Linux / Tencent OpenCloudOS / AWS AmazonLinux / AlibabaCloudLinux or AliyunLinux / OpenAnolis):
yum install wget -y
  • 對於 Alpine Linux:
apk update
apk add bash wget
sed -i 's/root:\/bin\/ash/root:\/bin\/bash/g' /etc/passwd

安裝腳本#

  • 國外:
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
  • 國內:
wget --no-check-certificate -qO InstallNET.sh 'https://gitee.com/mb9e8j2/Tools/raw/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh

開始 DD#

本文以 Debian 舉例

## 默認安裝最新的系統
bash InstallNET.sh -debian

也可以通過-pwd 密碼指定系統 DD 過之後的 SSH 密碼,通過-port指定系統 DD 過之後的 SSH 端口。
所有命令的例子:

bash InstallNET.sh -debian/kali/ubuntu/centos/almalinux/rockylinux/fedora(os type) 11(os version) -version 64(os bit, not necessary) -port "your server port" -pwd "your server password" -mirror "a valid url for linux image source" -dd/--image "dd image url" -filetype "gz or xz" -timezone "like Asia/Tokyo etc" --dhcp-static/--ip-addr 'x.x.x.x'(ip address) --ip-mask 'x.x.x.x'(subnet mask) --ip-gate 'x.x.x.x'(gateway) -firmware(Debian with hardware drivers)

其餘命令參數可以前往 Github 地址查看。

最後#

何逊扬州旧事,五更梦半醒,胡调吹彻
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。