VPS服务器、网站等知识
整理拿到服务器后的检查项、网络连通性、站点部署和常见运维经验。
这篇是一份 VPS 和网站运维备忘录,适合在买到服务器之后逐项检查和对照。
拿到服务器后先做几件事
1️⃣ 测试裸连:关闭本地代理工具,尝试直接访问服务器 IP。无论是国内还是国外服务器,通常都可以直连。若无法访问,尽快提交工单或联系客服更换 IP。
2️⃣ Ping 测试:前往 IT Dog Ping 测试,输入你的服务器 IP 进行全国可达性检测。
- 🟢 全绿:最佳状态
- 🟡 部分黄色:偏远地区访问较慢,一般影响不大
- 🔴 出现红色:说明该地区无法访问此 IP,建议提交工单更换
家宽检测
- 真家宽:Usage Type:(ISP) Fixed Line ISP
- 假家宽:Usage Type:(DCH) Data Center/Web Hosting/Transit
- 检测地址:https://www.ip2location.com/
融合怪测评脚本(一键综合测试)
curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
常用 VPS 脚本合集
原帖:NodeSeek - 常用 VPS 脚本合集 | 作者:福尔摩斯
1. DD 重装脚本
史上最强脚本(原帖链接)
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'
萌咖大佬的脚本
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p 密码-port 端口-a -firmware
beta.gs 大佬的脚本(官网)
wget --no-check-certificate -O NewReinstall.sh https://raw.githubusercontent.com/fcurrk/reinstall/master/NewReinstall.sh && chmod a+x NewReinstall.sh && bash NewReinstall.sh
DD Windows(基于史上最强脚本)
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -windows 10 -lang "cn"
🔑 默认登录凭据:账户
Administrator密码Teddysun.com激活方法:按Win + R打开运行框 → 输入powershell→ 执行以下命令:
irm https://get.activated.win | iex
2. 综合测试脚本
NodeQuality
bash <(curl -sL https://run.NodeQuality.com)
融合怪
bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)
bench.sh(官网)
wget -qO- bench.sh | bash
LemonBench
wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast
NodeBench
bash <(curl -sL https://raw.githubusercontent.com/LloydAsp/NodeBench/main/NodeBench.sh)
3. 性能测试
yabs(含多种 Geekbench 参数)
完整测试
curl -sL yabs.sh | bash
跳过网络,仅测 GB5
curl -sL yabs.sh | bash -s -- -i5
跳过网络和磁盘,仅测 GB5
curl -sL yabs.sh | bash -s -- -if5
仅测 GB5,不测 GB6
curl -sL yabs.sh | bash -s -- -5
4. 流媒体及 IP 质量测试
流媒体解锁检测(最常用)
bash <(curl -L -s check.unlock.media)
原生 IP 检测脚本
bash <(curl -sL Media.Check.Place)
准确度最高的检测
bash <(curl -L -s https://github.com/1-stream/RegionRestrictionCheck/raw/main/check.sh)
IP 质量体检脚本
bash <(curl -sL IP.Check.Place)
一键修改解锁 DNS
wget https://raw.githubusercontent.com/Jimmyzxk/DNS-Alice-Unlock/refs/heads/main/dns-unlock.sh && bash dns-unlock.sh
5. 测速脚本
| 名称 | 命令 |
|---|---|
| Speedtest | bash <(curl -sL bash.icu/speedtest) |
| Taier | bash <(curl -sL res.yserver.ink/taier.sh) |
| Hyperspeed | bash <(curl -Lso- https://bench.im/hyperspeed) |
| 全球测速 | wget -qO- nws.sh | bash |
| 区域速度测试 | wget -qO- nws.sh | bash -s -- -r region_name |
| Ping 和路由测试 | wget -qO- nws.sh | bash -s -- -rt [region] |
6. 回程测试
直接显示回程(适合新手)
curl https://raw.githubusercontent.com/ludashi2020/backtrace/main/install.sh -sSf | sh
回程详细测试(推荐)
wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh
备选脚本:
wget https://ghproxy.com/https://raw.githubusercontent.com/vpsxb/testrace/main/testrace.sh -O testrace.sh && bash testrace.sh
7. 功能脚本
添加 SWAP
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
Fail2ban(防暴力破解)
wget --no-check-certificate https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log
一键开启 BBR(适用于较新的 Debian / Ubuntu)
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
多功能 BBR 安装脚本
wget -N --no-check-certificate "https://gist.github.com/zeruns/a0ec603f20d1b86de6a774a8ba27588f/raw/4f9957ae23f5efb2bb7c57a198ae2cffebfb1c56/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
锐速 / BBRPlus / BBR2 / BBR3
wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
TCP 窗口调优
wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh
添加 WARP
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]
25 端口开放测试
telnet smtp.aol.com 25
8. 一键安装常用环境及软件
| 软件 | 安装命令 |
|---|---|
| Docker | bash <(curl -sL 'https://get.docker.com') |
| Python | curl -O https://raw.githubusercontent.com/lx969788249/lxspacepy/master/pyinstall.sh && chmod +x pyinstall.sh && ./pyinstall.sh |
| iperf3 | apt install iperf3 |
| realm | bash <(curl -L https://raw.githubusercontent.com/zhouh047/realm-oneclick-install/main/realm.sh) -i |
| gost | wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/qqrrooty/EZgost/main/gost.sh && chmod +x gost.sh && ./gost.sh |
| 极光面板 | bash <(curl -fsSL https://raw.githubusercontent.com/Aurora-Admin-Panel/deploy/main/install.sh) |
| 哪吒监控 | curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh |
| WARP | wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh |
| Aria2 | wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh |
| 宝塔面板 | wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && sudo bash install.sh |
| PVE 虚拟化 | bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh) |
| Argox | bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/argox/main/argox.sh) |
⚙️ 哪吒监控前端配置参考
window.ShowNetTransfer = true;
window.FixedTopServerName = true;
window.DisableAnimatedMan = true;
9. 综合功能脚本
科技 lion
apt update -y && apt install -y curl
bash <(curl -sL kejilion.sh)
SKY-BOX
wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
10. VPS 常备小命令(非脚本)
参考原帖:NodeSeek - VPS 常备小命令
11. 杜甫检测与进阶操作
杜甫检测脚本
curl -sL https://sick.onl | bash
wget https://github.com/Aniverse/A/raw/i/a && bash a
wget -qO- nws.sh | bash
DD 进阶操作
## 下载脚本
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
## 基础 DD
bash InstallNET.sh -debian 12
## 指定 RAID DD
bash InstallNET.sh -debian 12 -raid "0"
## 指定网络参数 DD
bash InstallNET.sh -debian 12 --ip-addr 139.162.52.1 --ip-mask 24 --ip-gate 139.162.52.1 --ip6-addr 2a07:e040:2:1d3::1 --ip6-gate 2a07:e040::1 --ip6-mask 32
## 指定密码 DD
bash InstallNET.sh -debian 12 -pwd 'password'
硬件信息测试
curl -sL https://raw.githubusercontent.com/Yuri-NagaSaki/SICK/refs/heads/main/hardware_info.sh | bash -s -- -cn
禁用 IPv6
## 写入禁用 IPv6 的规则
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
## 立即生效
sysctl -p
📦 bin456789 的 DD 脚本
原帖:NodeSeek - 比"史上最强"更强 | 作者:bin456789
🚀 主要特性
- 支持 Windows ↔ Linux、Windows ↔ Windows 互 DD,以及安装 Windows ISO
- 低内存友好:256MB 可装 Alpine / Debian / Kali,512MB 可装 Ubuntu / CentOS / Arch 等
- 自动使用精简内核,检测不兼容磁盘控制器时回退常规内核
- 支持重启到 netboot.xyz 或 Alpine LiveOS
- DD / ISO 安装 Windows 时可插入静态 IP
- 兼容网关不在子网范围、/32 位掩码、/128 位掩码等场景
- SSH / Web 查看安装进度,出错后可通过 SSH 安装回 Alpine,永不失联
- 无多余 boot / swap 分区
- 动态 IP 被其他脚本改为静态后,能自动检测并还原
- 全程使用分区表 ID 识别硬盘,确保安全