VPS常用脚本合集

2022-12-04 Note 1,596

所有收集的脚本均来自与网络,不定期更新。

  • 三网回程路由测试
curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh
  • 流媒体NetFlix解锁检测脚本
wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/v3.1.0/nf_linux_amd64 && chmod +x nf && ./nf
  • SuperSpeed三网测速脚本(修复版)
bash <(curl -Lso- https://www.infski.com/files/superspeed.sh)
  • Debian/Ubuntu/CentOS 网络重装一键脚本
wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh

CentOS的密码是:Pwd@CentOS
其他系统密码是:Pwd@Linux

  • 国内VPS DD脚本(debian11)
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a -p MoeClub.org --mirror 'http://mirrors.ustc.edu.cn/debian/'

全自动安装默认root密码:MoeClub.org

如果想要debian10,那么在-d之后把11改成10,-v是位数,32,64位,-p后是密码,默认MoeClub.org

  • 预加载脚本,取消密钥登录改为密码登录(GCP/AWS)
echo root:iDonglei |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
  • AWS EC2 DD脚本
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -d 11 -v 64 -a --ip-addr 172.x.x.x --ip-gate 172.26.x.x --ip-mask 255.255.240.0 --mirror 'http://mirror.xtom.com.hk/debian/'

代码里面XX的参数根据自己的自行更换

ip-addr :IP Address/IP地址

ip-gate :Gateway /网关

ip-mask :Netmask /子网掩码

默认密码为 MoeClub.org

  • 流媒体测试脚本
bash <(curl -L -s check.unlock.media)
  • Frps一键安装脚本
wget https://s1.idonglei.com/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh install

脚本有两个节点,Github和Aliyun自行按照服务器位置选择合适的节点

  • OVH Cloud VPS 一键DD

准备:请刷新Mirrors缓存或更换镜像源以及安装重装系统的前提组件

Debian/Ubuntu:

apt update -y && apt dist-upgrade -y
apt-get install -y xz-utils openssl gawk file wget screen && screen -S os

RedHat/CentOS:

yum makecache && yum update -y
yum install -y xz openssl gawk file glibc-common wget screen && screen -S os

使用教程:

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -a -p "你的密码" -port 22 --ip-addr 135.148.x.x --ip-gate 135.148.x.x --ip-mask 255.255.0.0

注意:上面的IP地址不用说了,网关使用route命令得不到实际网关要加一个-n参数:route -n

最后的子网掩码,route -n得到的是255.255.255.255,但是不能用这个,要改成255.255.0.0,(必须改成这个,不然机器失联!!!)否则会因为网络不通卡在下载image文件上。

查看VNC:

请把下面代码:../vps/vps-abcdef12.vps.ovh.us/dashboard/..之中的vps-abcdef12.vps.ovh.us换成自己的服务器序号!!!

https://us.ovhcloud.com/manager/#/dedicated/vps/vps-abcdef12.vps.ovh.us/dashboard/kvm

另外,如果在DD过程中出现:

-bash: !": event not found

原因为您所输入的命令中间包含 !,叹号不能组成命令。应该将 !转义或者去除。

发布评论

© iDongLei All Rights Reserved 浙ICP备2021013583号-5

Huaweicloud 强力驱动 / RunTime Day / Shop / Status / About / XML