VPS 常用脚本
以下脚本适用 Debian、Ubuntu 系统
安装 bash: curl
sudo apt update && sudo apt install curl -y
安装 Curl 和 wget
apt update -y
apt install curl wget -y
安装 unzip 和 zip
sudo apt update
sudo apt install unzip
安装 X-ui 教程
执行:
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)
一、开启BBR
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
sysctl net.ipv4.tcp_available_congestion_control
lsmod | grep bbr
二、IP质量体检
bash <(curl -sL IP.Check.Place)
三、流媒体解锁
bash <(curl -L -s check.unlock.media) -M 4
- 或者
bash <(curl -L -s media.ispvps.com)
- 线路测试
curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh
- 回程
curl https://raw.githubusercontent.com/ludashi2020/backtrace/main/install.sh -sSf | sh
四、融合怪
bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)
五、YABS
wget -qO- yabs.sh | bash
不测网络 GB5
curl -sL https://yabs.sh | bash -s -- -i56
不测网络 GB6
curl -sL yabs.sh | bash -s -- -6 -ign
六、Bench
wget -qO- bench.sh | bash
七、添加SWAP
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
八、独服查询脚本
详细查询
curl -sL https://raw.githubusercontent.com/Yuri-NagaSaki/SICK/refs/heads/main/hardware_info.sh | bash -s -- -cn
通电查询
wget https://github.com/Aniverse/A/raw/i/a && bash a
九、修改默认SSH端口,自行替换2222
sed -i 's/#Port\ 22/Port\ 2222/' /etc/ssh/sshd_config && systemctl reload ssh
十、禁止PING设置 (防火墙设置)
iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -j DROP
十一、MySQL 5.7 内存优化:
performance_schema_max_table_instances=400
table_definition_cache=400
performance_schema=off
innodb_buffer_pool_chunk_size=64M
innodb_buffer_pool_size=64M
科技 lion
curl -sS -O https://raw.githubusercontent.com/kejilion/sh/main/kejilion.sh && chmod +x kejilion.sh && ./kejilion.sh
文章目录