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

  • A+
所属分类:未分类

我们使用的服务商提供的系统很多都是精简的不全面的,对于我们某些来说很不方便,因此大神Vicer做出来的重装纯净系统这里转载,底下有地址:

注意:

全自动安装默认root密码:MoeClub.org,安装完成后请立即更改密码.
能够全自动重装Debian/Ubuntu/CentOS等系统.
同时提供dd安装镜像功能,例如: 全自动无救援dd安装windows系统
全自动安装CentOS时默认提供VNC功能,可使用VNC Viewer查看进度,
VNC端口为1或者5901,可自行尝试连接.(成功后VNC功能会消失.)
目前CentOS系统只支持任意版本重装为 CentOS 6.9 及以下版本.

特别注意:OpenVZ构架不适用.

安装:(本人喜欢使用debian和ubuntu)

#Debian/Ubuntu:

apt-get update
apt-get install -y xz-utils openssl gawk file
 wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod a+x InstallNET.sh
备用(本人)
1,wget --no-check-certificate -qO InstallNET.sh "https://www.vrrmr.net/code/InstallNET.sh" && chmod a+x InstallNET.sh
2bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/1835588093/lotServer/master/InstallNET/InstallNET.sh') -u 18.04 -v 64 -a -p 自定义密码  #快速直接安装ubuntu18.04 64位的系统

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

-p  passwd

# dist-name: 发行版本代号
# dist-version: 发行版本号
# -apt/-yum/--mirror : 使用定义镜像
# -a/-m : 询问是否能进入VNC自行操作. -a 为不提示(一般用于全自动安装), -m 为提示.

使用示例:

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

bash InstallNET.sh -u 16.04 -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 安装 Windows 系统:

bash InstallNET.sh -dd '[Windows dd包直连地址]'
bash InstallNET.sh -dd 'https://moeclub.org/get-win7embx86-auto'

可以自己找或者自己制作dd包

::以管理员身份运行CMD::
::更改用户的密码
net user [用户名] [密码]
::激活 Administrator 账户
net user Administrator /active:yes
::设置 Administrator 账户密码
net user Administrator [新密码]
::添加用户
net user [用户名] [密码] /add
::将用户添加至 Administrator
net localgroup Administrators [用户名] /add
::删除用户
net user [用户名] /del

手动:

dd之前先用fdisk -l命令查看有哪些磁盘,如果是vda等就把命令中dd of=/dev/sdb改为dd of=/dev/vda

wget xiaofd.github.io/ddwin.sh && bash ddwin.sh -w http直链地址 -d /dev/vda

-w 为http直连 gzip压缩格式dd包链接 -d 为 dd目标硬盘标识

dd完成后,远程桌面登陆

  1. 在 Windows 上下载 KMS-VL-ALL-6.9-Chs.zip,解压
  2. 右击KMS-VL-ALL.cmd,以管理员身份运行.

在磁盘管理中,点击C盘,右键选择“扩展卷”,可以直接“增加”C盘的空间到原本的大小。

wget -O- http://down.80host.com/iso/dd/win7_cn_5gb_virtio_scsi.gz | gunzip | dd of=/dev/sdb

转载自:萌神

passwd: fei5seven / Vicer /MoeClub.org 三选一

一键重装AutoReinstall.sh

另外一个DD代码,也是根据萌神修改的(密码;Pwd@Linux,Pwd@CentOS)安装好后自己修改

wget –no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh

 

CXTHHHHH重装脚本

对于Microsoft Windows。默认的用户名是:Administrator,默认的密码是:cxthhhhh.com。对于Linux(CentOS / Debian / Ubuntu),裸机系统部署平台等,默认的用户名是:root,默认的密码是:cxthhhhh.com

#下载脚本
wget --no-check-certificate -qO ~/Network-Reinstall-System-Modify.sh 'https://www.cxthhhhh.com/CXT-Library/Network-Reinstall-System-Modify/Network-Reinstall-System-Modify.sh' && chmod a+x ~/Network-Reinstall-System-Modify.sh
#进入安装选项
bash ~/Network-Reinstall-System-Modify.sh -UI_Options

腾讯云重装命令:

wget -N --no-check-certificate https://down.vpsaff.net/linux/dd/network-reinstall-os.sh && \
chmod +x network-reinstall-os.sh && ./network-reinstall-os.sh

注意事项:

  • 由于CentOS 7以上改变了安装机制,需要2G或更多内存才能完成网络重装;
  • CentOS 7和8 DD方式来自第三方,本站不作任何保证,好处就是不受VPS内存大小限制;
  • 重装系统需要比较长的时间,请耐心等待,如果服务商有提供VNC可以查看全过程。

四:其它问题

1,解决Error, Not found interfaces config.问题/

2个命令:

一:

mkdir /etc/network/interfaces.d

二:

echo "# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug ens3
iface ens3 inet dhcp

" > /etc/network/interfaces

时间同步:

  1. rm -rf /etc/localtime
  2. ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  3. date
weinxin
我的QQ群
这是我的QQ群扫一扫

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:1   其中:访客  0   博主  0

    • minlearn minlearn 0

      https://blog.csdn.net/MinLearn/article/details/107753981 pebuilder:一个云主机在线dd装机的改进程序(有演示)