VPS或服务器一键网络重装系统(linux or win)

作者: mikj 分类: google, linux, 建站学习, 教程使用, 资源分享 发布时间: 2018-11-29 10:17 ė 6没有评论

重要的事情说3次,2个脚本都不支持openvz,不支持openvz,不支持openvz
 

萌咖重装系统/纯净安装一键脚本
全自动安装默认root密码:Vicer,安装完成后请立即更改密码。
能够全自动重装Debian/Ubuntu/CentOS等系统。
同时提供dd安装镜像功能,例如: 全自动无救援dd安装windows系统。
全自动安装CentOS时默认提供VNC功能,可使用VNC Viewer查看进度。
VNC端口为1或者5901,可自行尝试连接。(成功后VNC功能会消失)
目前CentOS系统只支持任意版本重装为 CentOS 6.x 及以下版本。
特别注意:
萌咖提供的dd安装镜像
远程登陆账号为: Administrator
远程登陆密码为: Vicer
仅修改了主机名,可放心使用.(建议自己制作.)
 
确保安装了所需软件:

#Debian/Ubuntu:
apt-get install -y xz-utils openssl gawk file
#RedHat/CentOS:
yum install -y xz openssl gawk file

如果出现了错误,请运行:

#Debian/Ubuntu:
apt-get update
#RedHat/CentOS:
yum update

 
快速使用示例:

bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 8 -v 64 -a

 
下载及说明:

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 为提示.

 
使用示例:

#使用默认镜像全自动安装
bash InstallNET.sh -d 8 -v 64 -a

#使用自定义镜像全自动安装
bash InstallNET.sh -c 6.9 -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 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/get-win7embx86-auto'

#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像(调用文件ID的方式)
#bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd "$(echo "1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J" |xargs -n1 bash <(wget --no-check-certificate -qO- 'https://moeclub.org/get-gdlink'))"

#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像
#bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd "$(echo "https://drive.google.com/open?id=1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J" |xargs -n1 bash <(wget --no-check-certificate -qO- 'https://moeclub.org/get-gdlink'))"

 
cxthhhhh[魔改版]一键网络重装系统
 

重装系统前环境需求
1. 当前已安装任意由GRUB or GRUB2引导Linux系统(RedHat/CentOS/Debian/Ubuntu/Etc.)
2. 安装重装系统的前提组件
①. RedHat/CentOS:

yum install -y xz openssl gawk file

 
②. Debian/Ubuntu:

apt-get install -y xz-utils openssl gawk file

 
仅需复制粘贴两行代码+等待15-45分钟完成,因硬件配置和网络环境不同,安装全程需要15-60分钟,请耐心等待。安装完成即可通过IP:22(Linux SSH)/IP:3389(Windows RDP)进行连接。
密码不变,所有的系统都是[cxthhhhh.com]。
 

一、下载脚本(通过root用户运行)

wget --no-check-certificate -qO ~/Network-Reinstall-System-Modify.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/Network-Reinstall-System-Modify.sh' && chmod a+x ~/Network-Reinstall-System-Modify.sh

 
二、安装系统 (任选其一)

bash ~/Network-Reinstall-System-Modify.sh -CentOS_6

bash ~/Network-Reinstall-System-Modify.sh -CentOS_7

bash ~/Network-Reinstall-System-Modify.sh -Debian_7

bash ~/Network-Reinstall-System-Modify.sh -Debian_8

bash ~/Network-Reinstall-System-Modify.sh -Debian_9

bash ~/Network-Reinstall-System-Modify.sh -Ubuntu_14.04

bash ~/Network-Reinstall-System-Modify.sh -Ubuntu_16.04

bash ~/Network-Reinstall-System-Modify.sh -Ubuntu_18.04

bash ~/Network-Reinstall-System-Modify.sh -Windows_Server_2003

bash ~/Network-Reinstall-System-Modify.sh -Windows_7_Vienna

bash ~/Network-Reinstall-System-Modify.sh -Windows_Server_2008R2

bash ~/Network-Reinstall-System-Modify.sh -Windows_Server_2012R2

bash ~/Network-Reinstall-System-Modify.sh -Windows_Server_2016

bash ~/Network-Reinstall-System-Modify.sh -Windows_Server_2019

 
需要啥系统自己直接安装吧,https://d.cao.by/os/dd/也备份的压缩文件包
脚本代码如下:

#!/bin/bash

## This is the magically modified version of the one-click reload script.
## It can reinstall CentOS, Debian, Ubuntu and other Linux systems (continuously added) over the network in one click.
## It can reinstall Windwos 2003, 7, 2008R2, 2012R2, 2016, 2019 and other Windows systems (continuously added) via the network in one click.
## Technical support is provided by the technical blog. (based on the original version of Vicer)

## Magic Modify version author:
## Support GRUB or GRUB2 for installing a clean minimal system.
## Default root password: cxthhhhh.com
## Blog: https://tech.cxthhhhh.com
## Written By Technical Blog

## Original version author:
## Suitable for using by GRUB.
## Blog: https://moeclub.org
## Written By Vicer


echo -e "\n\n\n"
clear
echo -e "\n"
echo "---------------------------------------------------------------------------------------------------------------------"
echo -e "\033[33m [Magic Modify] Reinstall the system (any Windows / Linux) requires only network and one click \033[0m"
echo -e "\033[33m System requirements: Any Linux system with GRUB or GRUB2, recommended CentOS7/Debian9/Ubuntu18.04 \033[0m"
echo -e "\033[33m Test version, not released, only for testing within the group. \033[0m"
echo "---------------------------------------------------------------------------------------------------------------------"
echo -e "\n"
sleep 5s


if [ $1 = '-CentOS_6' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -c 6.9 -v 64 -a
fi

if [ $1 = '-CentOS_7' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/CentOS/CentOS_7.X_NetInstall_AutoPartition.vhd.gz'
fi

if [ $1 = '-Debian_7' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -d 7 -v 64 -a
fi

if [ $1 = '-Debian_8' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -d 8 -v 64 -a
fi

if [ $1 = '-Debian_9' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -d 9 -v 64 -a
fi

if [ $1 = '-Ubuntu_14.04' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -u 14.04 -v 64 -a
fi

if [ $1 = '-Ubuntu_16.04' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -u 16.04 -v 64 -a
fi

if [ $1 = '-Ubuntu_18.04' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -u 18.04 -v 64 -a
fi

if [ $1 = '-Windows_Server_2003' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2003_DataCenter_CN.vhd.gz'
fi

if [ $1 = '-Windows_7_Vienna' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_7_Vienna_Ultimate_CN.vhd.gz'
fi

if [ $1 = '-Windows_Server_2008R2' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2008R2_DataCenter_CN.vhd.gz'
fi

if [ $1 = '-Windows_Server_2012R2' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2012R2_DataCenter_CN.vhd.gz'
fi

if [ $1 = '-Windows_Server_2016' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2016_DataCenter_CN.vhd.gz'
fi

if [ $1 = '-Windows_Server_2019' ]
then
    wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2019_DataCenter_CN.vhd.gz'
fi


echo "---------------------------------------------------------------------------------------------------------------------"
echo -e "\033[31m !!!!!!!!Error!!!!!!!!Error!!!!!!!!Error!!!!!!!! \033[0m"
echo -e "\033[31m Please check if the options are correct. For example [-CentOS_7/-Windows_Server_2019] \033[0m"
echo "---------------------------------------------------------------------------------------------------------------------"
echo -e "\n"
exit

 
分享的是萌咖的一键脚本cxthhhhh一键包,2个都非常好用,感谢有这么多的开源大佬,让网络世界更美好!!!!

本文出自 小沨的天空,转载时请注明出处及相应链接。

本文永久链接: https://www.xinai.de/82998.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注

You must enable javascript to see captcha here!

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

Ɣ回顶部