VPS相关常用脚本

0.DDdebian:

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p "654321" -port "22"

00.自定义DD debian(OVH适用):

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

1. ##Ubuntu/Debian 系统升级并安装 Curl/wget/sudo

apt update -y && apt install curl -y && apt install wget -y && apt install sudo -y 

2.开启BBR:

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p

3.修改root账号,用root登录

sudo passwd root   //用sudo修改root帐户
Password:   //输入密码
Enter new UNIX password:   //提示输入新的root帐户密码
Retype new UNIX password: //再输入一次确认密码

4.修改root账号密码登录:

vim /etc/ssh/sshd_config

找到PermitRootLogin without-password 修改为 PermitRootLogin yes

找到PasswordAuthentication no 修改为PasswordAuthentication yes

按下键盘的Esc键,接着输入   :wq 保存并退出。

然后重启,设置以root账号和密码的方式登录。

Centos root登录:

vi /etc/ssh/sshd_config

修改后,重启sshd

service sshd restart

5.##Centos 系统安装 Curl 方法

yum update -y && yum install curl -y

6. ##CentOS Yum 安装 wget

yum -y install wget 

7.VPS速度、性能测试

wget -qO- git.io/superbench.sh | bash

8.回程路由测速

wget -qO- git.io/autobesttrace | bash

9.是否解锁Netflix(官网https://github.com/qishaobuluo/NetflixTest

yum install -y curl jq 2> /dev/null || apt install -y curl jq && bash <(curl -sSL https://raw.githubusercontent.com/qishaobuluo/NetflixTest/main/nf.sh)

10.宝塔官方挂载磁盘工具

Debian系统请使用以下命令:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

Centos系统请使用以下命令:

yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

Ubuntu系统请使用以下命令:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh

11.UnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position 15-21: ordinal not in range(256)

使用   locale  命令

使用 LANG 命令

LANG=en_US.utf8;问题解决。感谢!

12.root用户下bash: reboot :command not found

查看当前PATH

echo $PATH

更改PATH

export PATH=$PATH:$HOME/bin:/sbin:/usr/bin:/usr/sbin

之后即可使用reboot,在root用户洗尽量不要更改path参数