本项目收集了常用的 VPS 一键脚本,涵盖测试、运维、加速、面板、建站、监控等场景。
每个脚本都包含 使用命令 和 作用说明,方便直接复制使用。
一、综合性能测试
Bench.sh
- 命令:wget -qO- bench.sh | bash
- 作用:测试 CPU、内存、磁盘、网络等综合性能
SuperBench.sh
- 命令:wget -qO- git.io/superbench.sh | bash
- 作用:三网测速 + 硬件性能检测
LemonBench
- 命令:curl -fsL https://ilemonrain.com/download/shell/LemonBench.sh | bash -s fast
- 作用:全面性能测试(硬件、带宽、IO)
yabs.sh
- 命令:curl -sL yabs.sh | bash
- 作用:快速性能测试,支持 Geekbench 和 iperf3
UnixBench
- 命令:wget https://github.com/kdlucas/byte-unixbench/archive/master.zip
- 作用:经典 CPU/内存综合基准测试
Nench
- 命令:curl -sL wget.racing/nench.sh | bash
- 作用:I/O、CPU、网络简单测试
二、网络测速与回程路由
Speedtest-cli
- 命令:pip install speedtest-cli && speedtest
- 作用:调用 Ookla 测速 API
Librespeed-cli
- 命令:wget -qO- https://github.com/librespeed/speedtest-cli/releases/latest/download/speedtest-cli
- 作用:自建测速节点工具
Superspeed.sh(三网测速)
- 命令:wget -qO- git.io/superspeed | bash
- 作用:三大运营商节点测速
BestTrace 回程路由
- 命令:wget https://cdn.ipip.net/17mon/besttrace4linux.zip
- 作用:查看回程路由情况
NextTrace
- 命令:bash <(curl -Ls https://cdn.jsdelivr.net/gh/xgadget-lab/nexttrace/install.sh)
- 作用:可视化回程路由分析
MTR
- 命令:apt install mtr -y
- 作用:网络丢包和路由诊断
Iperf3
- 命令:apt install iperf3 -y
- 作用:带宽测试
三、IP 信息与流媒体解锁检测
RegionRestrictionCheck
- 命令:bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
- 作用:流媒体解锁测试(Netflix/Disney+/YouTube)
nf.sh (Netflix)
- 命令:bash <(curl -sSL https://raw.githubusercontent.com/sjlleo/netflix-verify/main/nf.sh)
- 作用:检测 Netflix 解锁情况
MediaUnlockTest
- 命令:bash <(curl -L -s https://raw.githubusercontent.com/CoiaPrant/MediaUnlockTest/master/check.sh)
- 作用:多平台流媒体解锁检测
ChatGPT 解锁检测
- 命令:curl -s https://chat.openai.com/cdn-cgi/trace
- 作用:检测 IP 是否支持 OpenAI/ChatGPT
Bilibili 港澳台检测
- 命令:curl -s https://api.bilibili.com/pgc/player/web/playurl?cid=282158181&bvid=BV1Jt411g7Y6
- 作用:检测是否支持港澳台番剧
四、系统优化与内核加速
BBR (teddysun)
- 命令:wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && bash bbr.sh
- 作用:开启 TCP BBR 加速
LotServer
- 命令:bash <(curl -L -s https://git.io/lotServerInstall.sh)
- 作用:锐速内核加速
Swap 一键添加
- 命令:wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
- 作用:自动创建和管理 Swap
内核升级脚本
- 命令:wget https://raw.githubusercontent.com/teddysun/across/master/kernel_update.sh && bash kernel_update.sh
- 作用:升级 Linux 内核
五、常用面板与建站
宝塔面板
- 命令:curl -sSO http://download.bt.cn/install/install_panel.sh && bash install_panel.sh
- 作用:可视化建站和服务器管理
aaPanel
- 命令:wget -O install.shhttp://www.aapanel.com/script/install-ubuntu.sh&& bash install.sh
- 作用:国外版宝塔面板
LNMP 一键包
- 命令:wget http://soft.vpser.net/lnmp/lnmp1.8.tar.gz && tar zxf lnmp1.8.tar.gz && cd lnmp1.8 && ./install.sh lnmp
- 作用:LNMP 网站环境
Oneinstack
- 命令:wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz && tar xzf oneinstack-full.tar.gz && cd oneinstack && ./install.sh
- 作用:支持 LNMP/LAMP 环境
Webinoly
- 命令:wget -qO webinoly.shhttps://get.webinoly.com && sudo bash webinoly.sh
- 作用:WordPress/Nginx 优化环境
六、监控与探针
ServerStatus 探针
- 命令:git clone https://github.com/cppla/ServerStatus && cd ServerStatus && ./install.sh
- 作用:多服务器状态监控
Netdata
- 命令:bash <(curl -Ss https://my-netdata.io/kickstart.sh)
- 作用:系统性能监控
Glances
- 命令:pip install glances && glances
- 作用:跨平台性能监控
Prometheus + Grafana
- 命令:docker run -d prom/prometheus && docker run -d grafana/grafana
- 作用:企业级监控
七、Docker 与容器
Docker 官方脚本
- 命令:curl -fsSL https://get.docker.com | sh
- 作用:安装 Docker
Docker Compose
- 命令:curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- 作用:Docker Compose 管理
Portainer 面板
- 命令:docker run -d -p 9000:9000 portainer/portainer-ce
- 作用:Docker 可视化管理
CapRover
- 命令:bash <(curl -s https://captain.dev/install.sh)
- 作用:PaaS 应用托管
八、博客与网盘
WordPress 一键脚本
- 命令:docker run -d wordpress
- 作用:快速搭建博客
Typecho 一键脚本
- 命令:wget https://soft.moeclub.org/Typecho/install.sh && bash install.sh
- 作用:轻量博客系统
Halo 博客
- 命令:docker run -d halohub/halo
- 作用:新一代博客系统
Nextcloud
- 命令:docker run -d nextcloud
- 作用:自建云盘
Seafile
- 命令:docker run -d seafileltd/seafile
- 作用:企业网盘
九、下载与 BT 工具
51.Aria2 一键安装
-命令:bash <(curl -sL https://github.com/P3TERX/aria2.sh/raw/master/aria2.sh)
-作用:Aria2 下载工具,支持 RPC 管理
qBittorrent (Docker)
-命令:docker run -d --name=qbittorrent -p 8080:8080 linuxserver/qbittorrent
-作用:BT 客户端 Web 端
Transmission (Docker)
-命令:docker run -d --name=transmission -p 9091:9091 linuxserver/transmission
-作用:轻量级 BT 下载
rclone 一键安装
-命令:curl https://rclone.org/install.sh | bash
-作用:云盘管理工具,可挂载多云
Motrix 一键安装
-命令:wget https://raw.githubusercontent.com/agalwood/Motrix/master/install.sh && bash install.sh
-作用:支持 BT/HTTP/FTP 下载
十、加速/优化/防护
锐速 TCP 加速
-命令:bash <(curl -sL https://git.io/lotServerInstall)
-作用:内核网络加速
BBR2 内核加速
-命令:bash <(wget -qO- https://raw.githubusercontent.com/teddysun/across/master/bbr.sh)
-作用:升级内核并开启 BBR2
Firewall 一键脚本
-命令:wget https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/firewall.sh && bash firewall.sh
-作用:配置防火墙,阻止常见攻击
Fail2Ban 安装
-命令:apt install fail2ban -y
-作用:防止 SSH / FTP 暴力破解
DDOS 防护脚本
-命令:wget https://raw.githubusercontent.com/mrzool/lotserver/master/ddos.sh && bash ddos.sh
-作用:基础 DDOS 防护
十一、容器/编排/管理
Docker 镜像加速
-命令:mkdir -p /etc/docker && tee /etc/docker/daemon.json <<-'EOF' {"registry-mirrors": ["https://registry.docker-cn.com"]} EOF && systemctl restart docker
-作用:Docker 镜像加速
Traefik 面板
-命令:docker run -d -p 8080:8080 traefik
-作用:反向代理 + 动态路由
Portainer-CE 面板
-命令:docker run -d -p 9000:9000 portainer/portainer-ce
-作用:可视化 Docker 容器管理
Watchtower 自动更新
-命令:docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower
-作用:Docker 容器自动更新
K3s 一键安装
-命令:curl -sfL https://get.k3s.io | sh -
-作用:轻量 Kubernetes
十二、数据库与缓存
MySQL 安装脚本
-命令:apt install mysql-server -y
-作用:数据库服务器
MariaDB 安装脚本
-命令:apt install mariadb-server -y
-作用:MySQL 替代数据库
PostgreSQL 安装
-命令:apt install postgresql -y
-作用:关系型数据库
Redis 一键安装
-命令:apt install redis-server -y
-作用:内存缓存数据库
MongoDB 安装
-命令:apt install mongodb -y
-作用:文档型数据库
Memcached 安装
-命令:apt install memcached -y
-作用:分布式缓存
ClickHouse 一键安装
-命令:curl https://clickhouse.com/install.sh | bash
-作用:列式数据库
十三、日志与备份
Bash-Backup 一键脚本
-命令:wget https://raw.githubusercontent.com/mrzool/bash-backup/master/backup.sh && bash backup.sh
-作用:系统与网站备份
Rclone 云同步
-命令:curl https://rclone.org/install.sh | bash
-作用:同步文件到 OneDrive/Google Drive 等
Duplicity 备份脚本
-命令:apt install duplicity -y
-作用:加密增量备份
十四、监控/告警/运维
Zabbix Agent 安装
-命令:wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+ubuntu20.04_all.deb && dpkg -i zabbix-release_5.0-1+ubuntu20.04_all.deb && apt update && apt install zabbix-agent -y
-作用:Zabbix 监控
Prometheus Node Exporter
-命令:wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz && tar xvf node_exporter-1.5.0.linux-amd64.tar.gz && ./node_exporter
-作用:服务器性能数据采集
Grafana 一键安装
-命令:docker run -d -p 3000:3000 grafana/grafana
-作用:图形化监控面板
Telegraf + InfluxDB + Grafana
-命令:docker run -d --name=influxdb -p 8086:8086 influxdb
-作用:时间序列监控
ServerStatus 探针
-命令:git clone https://github.com/cppla/ServerStatus&& cd ServerStatus && ./install.sh
-作用:多节点状态监控
十五、流媒体下载与解锁
youtube-dl 安装
-命令:sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod +x /usr/local/bin/youtube-dl
-作用:下载 YouTube 视频
yt-dlp 安装
-命令:sudo pip3 install -U yt-dlp
-作用:youtube-dl 升级版,支持更多网站
Bilibili 下载工具
-命令:sudo pip3 install biliup
-作用:下载 B 站视频和弹幕
Netease Cloud Music 下载
-命令:git clone https://github.com/Binaryify/NeteaseCloudMusicApi.git&& cd NeteaseCloudMusicApi && npm install && node app.js
-作用:网易云音乐 API 下载
Aria2 + RPC 前端
-命令:bash <(curl -sL https://github.com/P3TERX/aria2.sh/raw/master/aria2.sh)
-作用:Aria2 搭建 RPC + Web 前端
十六、AI/聊天服务部署
ChatGPT 代理服务
-命令:git clone https://github.com/Yidadaa/ChatGPT-Next-Web.git && cd ChatGPT-Next-Web && npm install && npm run build && npm start
-作用:自建 ChatGPT Web 服务
OpenAI API 代理
-命令:docker run -d -p 3000:3000 yidadaa/openai-proxy
-作用:自建 OpenAI API 代理
ChatGPT-Web 一键部署
-命令:bash <(curl -sL https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/master/deploy.sh)
-作用:快速部署 ChatGPT 前端
Hugging Face 模型部署
-命令:git clone https://github.com/huggingface/transformers.git && cd transformers && pip install -e .
-作用:在 VPS 上部署 HF 模型
Text-generation-webui
-命令:git clone https://github.com/oobabooga/text-generation-webui.git && cd text-generation-webui && pip install -r requirements.txt && python server.py
-作用:本地运行大模型文本生成
十七、网站与内容管理
Hexo 一键安装
-命令:npm install -g hexo-cli && hexo init blog && cd blog && npm install && hexo server
-作用:快速搭建博客网站
Ghost 一键安装
-命令:curl -sL https://ghost.org/cli/ghost-cli.sh | bash
-作用:Ghost 博客系统
Hugo 静态站生成
-命令:wget https://github.com/gohugoio/hugo/releases/download/v0.112.0/hugo_0.112.0_Linux-64bit.tar.gz && tar -zxvf hugo_0.112.0_Linux-64bit.tar.gz && mv hugo /usr/local/bin/
-作用:生成静态网站
WordPress Docker 部署
-命令:docker run -d -p 8080:80 wordpress
-作用:快速部署 WordPress
Typecho Docker 部署
-命令:docker run -d -p 8080:80 typecho
-作用:轻量博客系统
十八、网络与运维工具
HTOP 系统监控
-命令:apt install htop -y && htop
-作用:交互式进程查看
Nload 网络流量监控
-命令:apt install nload -y && nload
-作用:实时网络流量监控
Glances 系统监控
-命令:pip install glances && glances
-作用:跨平台性能监控
vnStat 流量统计
-命令:apt install vnstat -y && vnstat -u -i eth0 && vnstat
-作用:长期网络流量统计
iftop 网络带宽监控
-命令:apt install iftop -y && iftop
-作用:实时流量分析
十九、自动化与脚本管理
Cron 一键管理
-命令:apt install cron -y && crontab -e
-作用:定时任务管理
AutoTask 脚本管理
-命令:git clone https://github.com/username/autotask.git && cd autotask && bash install.sh
-作用:集中管理 VPS 自动化任务
Ansible 自动化部署
-命令:apt install ansible -y
-作用:批量服务器管理
Fabric 自动化运维
-命令:pip install fabric && fab -H host1,host2 taskname
-作用:远程执行运维任务
SaltStack 自动化
-命令:apt install salt-master salt-minion -y
-作用:大规模服务器管理

