服务器DD在线重装系统

热帖

今儿折腾自己的服务器,最后搞得太乱索性重新安装一下系统,纯净、省心。记录一下相关命令,以备后用。

我的服务器都是Linux系统,一台Centos(比较老了,不过蛮多站建在上面,暂时不想动它)、一台Debian,另外还把电脑Vmware虚拟机中的一个Centos系统给DD成了Debian(其实主要是记录这个过程,因为以后那台Centos的服务器可能会用得上)

首先安装依赖环境

sudo apt update -y
sudo apt install wget -y
yum install wget -y
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
bash InstallNET.sh -debian 12 -mirror "http://ftp.riken.jp/Linux/debian/debian/"

等自动重启后连接SSH,默认端口是22,用户名仍然是root,密码LeitboGi0ro。连接后记得用passwd命令修改root密码。

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
图片[1]-服务器DD在线重装系统-上网的蜗牛

增加一个甲骨文Ubuntu DD Debian系统的(上面的方法我在甲骨文下使用均失联)
搞不懂了,用下面的系统宝塔不正常(在2台服务器上多次DD测试),又用回上面的系统了

#!/bin/bash
echo root:密码 |sudo chpasswd root
sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
#!/bin/bash
echo root:密码 |sudo chpasswd root
sudo sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
sudo apt-get update && sudo apt-get install -y xz-utils openssl gawk file net-tools
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a -firmware
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -p 'root密码' -a -firmware
温馨提示:本文最后更新于2024-04-03 14:53:58,某些文章具有时效性,若有错误或已失效,请在下方留言或联系上网的蜗牛
本资源为本站原创,转载请注明来源、保留版权信息,谢谢合作!

如果觉得本文有用就按Ctrl+D收藏,方便以后随时翻看,免得想看时又找不着 或 发现更多

本站所有资源站长均亲自测试过,确认能正常使用

三月 2

本站历史上的今天

    "吼吼~~~,往年的今天站长不知道跑哪里偷懒去了~~~"
© 版权声明
本文结束
喜欢就支持一下吧
点赞15 分享
评论 抢沙发

为了防止灌水,需登录后方可发表评论

    暂无评论内容