这是一份非常全面的、史上最强 VPS 服务器运维脚本工具箱合集,建议收藏。涵盖了系统重装、性能测试、网络诊断、功能增强和软件安装等多个方面。
一、系统安装与重装 (DD)
❗ 警告: 以下脚本会彻底格式化您的硬盘并重装系统。请务必提前备份所有重要数据。
1. Linux DD 脚本
史上最强 DD 脚本 (leitbogioro): DD 安装 Debian 12,并设置密码为
'password'。Bash
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 -pwd 'password'萌咖 DD 脚本 (MoeClub): DD 安装 Debian 11,支持自定义密码和端口。
Bash
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p 密码 -port 端口 -a -firmwarebeta.gs 通用重装脚本:
Bash
wget --no-check-certificate -O NewReinstall.sh https://raw.githubusercontent.com/fcurrk/reinstall/master/NewReinstall.sh && chmod a+x NewReinstall.sh && bash NewReinstall.sh
2. DD Windows 与激活
DD Windows 10 (中文版):
Bash
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -windows 10 -lang "cn"默认账户:
Administrator默认密码:
Teddysun.com
Windows 激活命令: 在 Windows 系统内使用
Win + R打开运行框,输入powershell后执行以下命令:Bash
irm https://get.activated.win | iex
二、综合性能与跑分测试
这些脚本用于全面评估 VPS 的 CPU 性能、磁盘 I/O 速度、内存和网络带宽等综合指标。
bench.sh: 经典的 Linux 综合性能测试。
Bash
wget -qO- bench.sh | bashLemonBench: 全能型性能测试脚本,使用
--fast快速运行。Bash
wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast融合怪 (ecs.sh): 一款流行的综合性测试脚本。
Bash
bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)YABS (Yet Another Bench Script): 专精于 CPU 和磁盘 I/O 测试,并运行 Geekbench 跑分。
Bash
curl -sL yabs.sh | bash跳过网络,仅测 GB5:
Bash
curl -sL yabs.sh | bash -s -- -i5
三、网络诊断:测速、流媒体与路由
用于测试 VPS 的网络质量、下载速度及国际流媒体解锁能力。
1. 测速脚本
Speedtest 测速: 标准 Speedtest CLI 测速。
Bash
bash <(curl -sL bash.icu/speedtest)全球测速 (nws.sh): 测试与全球各节点的上传/下载速度。
Bash
wget -qO- nws.sh | bashhyperspeed 高速测速:
Bash
bash <(curl -Lso- https://bench.im/hyperspeed)
2. 路由与回程测试
直接显示回程 (小白用): 快速查看回国路由。
Bash
curl https://raw.githubusercontent.com/ludashi2020/backtrace/main/install.sh -sSf | sh回程详细测试 (推荐): 详细的多地回程路由路径测试。
Bash
wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.shPing 和路由测试 (nws.sh):
Bash
wget -qO- nws.sh | bash -s -- -rt [region]
3. 流媒体与 IP 质量
流媒体解锁检测 (最常用):
Bash
bash <(curl -L -s check.unlock.media)IP 质量体检脚本: 检测 IP 的用途和质量。
Bash
bash <(curl -sL IP.Check.Place)
四、系统优化与功能增强
用于改善服务器的网络性能、安全性或添加基础功能。
1. 网络优化
一键开启 BBR (系统内核): 适用于较新的 Debian/Ubuntu,开启 BBR 拥塞控制。
Bash
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_controlls lsmod | grep bbr锐速/BBRPlus/BBR2/BBR3 多功能脚本: 提供多种网络加速方案。
Bash
wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.shTCP 窗口调优: 进行 TCP 参数优化。
Bash
wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh
2. 基础功能
添加 SWAP 虚拟内存: 为低内存 VPS 增加交换分区。
Bash
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.shFail2ban 安装: 自动屏蔽恶意登录 IP,提高 SSH 安全性。
Bash
wget --no-check-certificate https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log添加 Cloudflare WARP: 一键配置 WARP 代理。
Bash
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh25 端口开放测试:
Bash
telnet smtp.aol.com 25
五、常用环境与软件部署
用于快速部署常用的运行环境、面板和应用服务。
Docker 一键安装: 容器化平台。
Bash
bash <(curl -sL 'https://get.docker.com')iperf3 安装: 用于网络性能测试。
Bash
apt install iperf3宝塔面板 (Ubuntu):
Bash
wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && sudo bash install.sh哪吒监控探针: 轻量级服务器监控系统。
Bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.shAria2 下载工具:
Bash
wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.shPVE 虚拟化后端:
Bash
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)
六、综合功能脚本
集成了多种测试和管理功能于一身的脚本。
科技lion 综合脚本:
Bash
apt update -y && apt install -y curl bash <(curl -sL kejilion.sh)SKY-BOX 综合工具箱:
Bash
wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
七、其它资源/信息
TG中文汉化
https://t.me/setlanguage/classic-zh-cn送中IP报告地址,Google的帮助中心
https://support.google.com/websearch/contact/ip?hl=zh-CN
评论区