Linux VPS常用脚本

VPS配置查看:

curl -sL yabs.sh | bash -s — -i wget -qO- bench.sh | bash curl -Lso- bench.sh | bash

测速:

bash <(curl -Lso- https://git.io/superspeed.sh) bash <(curl -Lso- http://yun.789888.xyz/speedtest.sh)

流媒体检查:

bash <(curl -L -s check.unlock.media) bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh) bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh“)

BBR一键脚本

wget -N –no-check-certificate “https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh” && chmod +x tcp.sh && ./tcp.sh

 

BBR手动开启

#首先先更新下系统,然后安装依赖组建:

apt-get update apt-get update && apt-get install -y wget curl #之后开启原生BBR:

echo “net.core.default_qdisc=fq” >> /etc/sysctl.conf echo “net.ipv4.tcp_congestion_control=bbr” >> /etc/sysctl.conf sysctl -p #检测是否正常开启BBR:

sysctl net.ipv4.tcp_available_congestion_control lsmod | grep bbr

 

回程路由:

wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh bash testrace.sh wget -qO- git.io/besttrace | bash

宝塔无需手机登录:

echo “{\”uid\”:1000,\”username\”:\”admin\”,\”serverid\”:1}” > /www/server/panel/data/userInfo.json

 

ubuntu 关闭防火墙

关闭ubuntu的防火墙 ufw disable 开启防火墙 ufw enable 卸载iptables apt-get remove iptables 关闭ubuntu中的防火墙的其余命令 iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -F

iptables转发

wget -qO natcfg.sh http://arloor.com/sh/iptablesUtils/natcfg.sh && bash natcfg.sh wget -N –no-check-certificate https://zhujiget.com/wp-content/uploads/2020/brook-pf.sh && chmod +x brook-pf.sh && ./brook-pf.sh

 

服务器开启root登陆

echo root:新密码 |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

安装docker

安装 curl -sSL https://get.docker.com/ | sh 卸载docker sudo apt-get remove docker docker-engine rm -fr /var/lib/docker/

挂载

mkfs.ext4 /dev/sdc mkdir /d mount /dev/sdc /d chmod -R 777 /d

Tagged on: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.