网站搭建
技术教程
ZAP-Hosting Gameserver and Webhosting

VPS常用命令、常用程序

💻 VPS 基础测试与信息查询 (Testing & Info)

类别功能描述命令/脚本
融合怪全面性能测试,通常包含系统信息、IO、测速等。curl -L https://github.com/spiritLHLS/ecs/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
IP解锁检查当前IP地址的媒体流(如Netflix等)解锁情况。bash <(curl -Ls IP.Check.Place)
聚合测评NodeLoc 综合性能测评脚本。CentOS: yum install wget&&wget -O Nlbench.sh https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/Nlbench.sh && chmod +x Nlbench.sh && ./Nlbench.sh <br> Debian/Ubuntu/Deepin: wget -O Nlbench.sh https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/Nlbench.sh && chmod +x Nlbench.sh && ./Nlbench.sh
路由追踪去程路由追踪。`curl nxtrace.org/nt
路由追踪查看回程路由。nexttrace 你的宽带ip
Iperf测速Iperf3 网络测速(需先安装)。apt update <br> apt install iperf3 <br> 客户端测试命令示例: iperf3.exe -c 小鸡的ip -P 1 -t 60 -R
是否超售检查是否使用了 virtio_balloon,间接判断可能存在超售(仅适用于KVM)。`lsmod

🛠️ VPS 系统管理和优化 (System Tools & Optimization)

类别功能描述命令/配置
脚本合集大杂烩多功能脚本。curl -fsSL https://raw.githubusercontent.com/eooce/ssh_tool/main/ssh_tool.sh -o ssh_tool.sh && chmod +x ssh_tool.sh && ./ssh_tool.sh
科技lion通用脚本合集(注意:原版可能收集信息)。原版: bash <(curl -sL kejilion.sh) <br> 修改版(去除统计,未经验证): `bash <(curl -sS https://raw.githubusercontent.com/kejilion/sh/main/kejilion.sh
内存优化增加 2G 虚拟内存 (Swap)。sudo fallocate -l 2G /swapfile <br> sudo chmod 600 /swapfile <br> sudo mkswap /swapfile <br> sudo swapon /swapfile <br> `echo ‘/swapfile none swap sw 0 0’
修改SSH端口将 SSH 默认端口 22 改为自定义端口。sudo nano /etc/ssh/sshd_config (修改 Port 行) <br> sudo systemctl restart sshd
密钥登录设置仅允许 SSH 密钥登录,提高安全性。nano ~/.ssh/authorized_keys (加入公钥) <br> … (修改 sshd_config 配置项) <br> sudo systemctl restart sshd
UFW 防火墙安装 UFW,并配置基本出入站规则(允许 SSH 端口)。sudo apt install ufw -y <br> sudo ufw default allow outgoing <br> sudo ufw default deny incoming <br> sudo ufw allow 22 (替换为你的 SSH 端口) <br> sudo ufw enable
Fail2ban安装 Fail2ban,防止 SSH 暴力破解。手动安装: sudo apt install fail2ban <br> 一键脚本: wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh <br> bash fail2ban.sh
修改主机名解决主机名解析问题。nano /etc/hosts (修改 127.0.1.1 后的主机名)
修改DNS更换系统 DNS 解析器,用于解锁或改善解析速度。脚本: chattr -i /etc/resolv.conf && wget -N --no-check-certificate https://raw.githubusercontent.com/chengziqaq/dnsunblocknetflix/master/dns-change.sh && chmod +x dns-change.sh && ./dns-change.sh 要增加的dns
TCP 调优网络参数优化,主要用于优化线路质量和稳定性。wget -q https://raw.githubusercontent.com/BlackSheep-cry/TCP-Optimization-Tool/main/tool.sh -O tool.sh && chmod +x tool.sh && ./tool.sh

💿 系统重装 (DD System)

类别功能描述命令/脚本
leitbogioroDD 系统为 Debian(SSH 端口不变,默认密码 LeitboGi0ro)。安装依赖和脚本: apt update -y <br> apt install wget -y <br> wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh <br> 执行: bash InstallNET.sh -debian
煎饼佬DD 系统脚本(默认密码 123@@@,可自定义)。`curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
第三方工具DD 系统的其他参考脚本。(链接地址)

🚀 代理服务及网络工具 (Proxy & Network)

类别项目 / 协议功能描述命令/脚本
sing-box233boysing-box 代理服务安装脚本。bash <(wget -qO- -o- https://github.com/233boy/sing-box/raw/main/install.sh)
sing-boxfscarmensing-box 代理服务带订阅功能脚本。bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh)
sing-boxmack-amack-a 8合1 sing-box 脚本。wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
sing-boxygkkkyonggekkk 的 sing-box 脚本。bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/sing-box-yg/main/sb.sh)
3x-ui面板管理代理服务面板管理系统。bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
WARP解锁工具安装 WARP,用于解锁流媒体(如Netflix)。首次运行: wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]
端口转发realm使用 realm 进行端口转发。wget -N https://raw.githubusercontent.com/qqrrooty/EZrealm/main/realm.sh && chmod +x realm.sh && ./realm.sh
端口转发gost使用 gost 进行端口转发。wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/qqrrooty/EZgost/main/gost.sh && chmod +x gost.sh && ./gost.sh
DNS解锁流媒体解锁使用脚本一键设置 DNS 解锁。wget https://raw.githubusercontent.com/Jimmyzxk/DNS-Alice-Unlock/refs/heads/main/dns-unlock.sh && bash dns-unlock.sh

📊 探针和监控 (Probes & Monitoring)

类别项目功能描述命令/脚本
哪吒探针v1 脚本官方安装脚本。curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
哪吒探针Cf tunnel 版基于 Cloudflare Tunnel 的版本(推荐)。(链接地址)
beszel 探针直接运行轻量级探针,用于实时监控。下载并运行: `curl -sL “…”
beszel 探针Docker 版使用 Docker Compose 部署 beszel。wget https://github.com/henrygd/beszel/raw/refs/heads/main/supplemental/docker/hub/docker-compose.yml <br> docker-compose up -d
WebsshNext terminal基于 Web 的终端访问和管理工具。(官方文档链接)
WebsshEasynode便捷的 Web 终端工具。(Github 链接)

🌐 建站和面板 (Web Panels)

类别项目功能描述命令/脚本
1Panel国产面板现代化、易用的 Linux 服务器运维管理面板。curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
aapanel国际版宝塔国际版建站和运维面板。URL=https://www.aapanel.com/script/install_7.0_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO "$URL" ;else wget --no-check-certificate -O install_7.0_en.sh "$URL";fi;bash install_7.0_en.sh aapanel
宝塔国内面板宝塔 Linux 面板(LTS 稳定版)。wget -O install.sh https://download.bt.cn/install/install_lts.sh && bash install.sh ed8484bec

🐳 Docker 相关 (Docker & Compose)

Docker 安装与管理

类别功能描述命令/脚本
安装 Docker官方一键安装脚本。curl -fsSL https://get.docker.com -o get-docker.sh <br> sudo sh get-docker.sh
更新容器使用 Watchtower 自动(或手动)更新所有容器并清理旧镜像。docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --cleanup --run-once
luckyDocker 版本的lucky,用于反向代理和自动申请证书。docker run -d --name lucky --restart=always --net=host gdy666/lucky
微信转发Docker 部署微信消息转发服务。(Docker Run 命令)
FilebrowserDocker 部署文件浏览器。(Docker Run 命令)

Docker Compose 部署示例

项目功能描述Compose Yaml 主要内容
DockgeDocker Compose 的 Web UI 管理工具。(安装初始化命令,用于下载 compose.yaml 并启动)
chatgpt-next-webChatGPT Next Web 的优化版本。(Compose Yaml 配置,注意端口映射和环境变量)
new-api 和 openwebui新一代 AI 接口转发和 Web 聊天界面 组合。(Compose Yaml 配置,注意端口映射、数据卷和网络设置)

📦 PT/媒体相关 (PT & Media)

类别功能描述命令/脚本
盒子刷流Dedicated-Seedbox 脚本,用于 PT 盒子刷流。bash <(wget -qO- https://raw.githubusercontent.com/jerry048/Dedicated-Seedbox/main/Install.sh) -u <帐号> -p <密码> -c 3072 -q 4.3.9 -l v1.2.19 -b -v
分类编号项目名称作用/描述GitHub/文档链接
密码与认证1VaultwardenBitwarden密码管理器的轻量级实现。https://github.com/dani-garcia/vaultwarden
远程与终端2RustDesk远程桌面软件的开源替代品。https://github.com/rustdesk/rustdesk
3EasyNode在线SSH工具。https://github.com/chaos-zhu/easynode
4Nexus-Terminal在线SSH工具。https://github.com/Heavrnl/nexus-terminal
文件与网盘5Cloudreve自建网盘程序,支持多种存储后端。https://github.com/cloudreve/Cloudreve
6Nextcloud一站式网盘、协作和效率工具套件。https://github.com/nextcloud/server
7MinIO高性能的分布式对象存储服务(自建S3)。https://github.com/minio/minio
8File Browser在线文件管理系统。https://github.com/filebrowser/filebrowser
9ZFile在线网盘程序。https://github.com/zfile-dev/zfile
10Rclone命令行工具,用于同步、挂载和管理多云存储。https://github.com/rclone/rclone
效率工具11Memos轻量级笔记/便签应用。https://github.com/usememos/memos
12Wallos个人订阅服务(付费项目)管理工具。https://github.com/ellite/Wallos
13Wastebin代码片段/文本管理服务(类似Pastebin)。https://github.com/matze/wastebin
媒体与娱乐14MoonTV影视聚合服务。https://github.com/samqin123/MoonTV
15Navidrome自建音乐流媒体服务。https://github.com/navidrome/navidrome
16qBittorrent Enhanced EditionqBittorrent的增强(反吸血)版本,用于PT下载。https://github.com/SuperNG6/Docker-qBittorrent-Enhanced-Edition
17阅读3服务器版小说阅读器“阅读”的服务器端。https://github.com/hectorqin/reader?tab=readme-ov-file
18Stump免费开源的数字图书馆。https://github.com/stumpapp/stump
19your_spotify查看和分析您的Spotify听歌数据。https://github.com/Yooooomi/your_spotify
文件传输与同步20FileCodeBox文件快递柜,用于临时或安全地分享文件。https://github.com/vastsa/FileCodeBox
21Resilio Sync基于P2P技术的文件同步工具。https://github.com/bt-sync/sync-docker
22ffsend轻量级高性能文件分享工具。https://github.com/timvisee/ffsend
23File-Transfer点对点传输工具。https://github.com/MatrixSeven/file-transfer-go
24SnapDrop本地网络文件传输工具(AirDrop类似)。https://github.com/SnapDrop/snapdrop
25FastSend点对点传输工具。https://github.com/ShouChenICU/FastSend
26丁丁快传基于Cloudflare Worker的快速传输工具。https://github.com/iiop123/dingding
网络与运维27FRP专注于内网穿透的高性能反向代理应用。https://github.com/fatedier/frp
28Komari服务器监控工具。https://github.com/komari-monitor/komari
29DNSmgr聚合DNS管理工具。https://github.com/netcccyun/dnsmgr
30CertimateSSL 证书管理工具。https://github.com/certimate-go/certimate
31AllinsslSSL证书全生命周期管理平台。https://github.com/allinssl/allinssl/
32DozzleDocker容器实时日志监控工具。https://github.com/amir20/dozzle
33Ansible UIAnsible批量主机管理的Web面板。https://github.com/sky22333/ansible-ui
网站与统计34Umami轻量级、注重隐私的网站数据统计分析工具。https://github.com/umami-software/umami
35Matomo功能强大的开源网站分析平台。https://github.com/matomo-org/matomo
36Sun-Panel个人导航页/仪表盘面板。https://doc.sun-panel.top/zh_cn/
37OpenList目录文件分享和展示。https://oplist.org
38Zurl自建短链接服务。https://github.com/helloxz/zurl
媒体与辅助39Stirling-PDFPDF在线编辑和处理工具。https://github.com/Stirling-Tools/Stirling-PDF
40ID Photos AIAI证件照生成工具。https://github.com/Zeyi-Lin/HivisionIDPhotos
41iCloudpd用于同步iCloud相册的Docker镜像。https://github.com/boredazfcuk/docker-icloudpd
42Homebox家庭物品清单和资产管理。https://github.com/sysadminsmedia/homebox
搜索与聚合43Pansou网盘资源搜索工具。https://github.com/fish2018/pansou
44RSSHub将几乎所有内容源转为标准RSS订阅源的工具。https://docs.rsshub.app/zh/
邮件与图床45Cloud-Mail基于CloudFlare自建的邮件服务。https://github.com/eoao/cloud-mail
46CloudFlare-ImgBed基于CloudFlare的图床服务。https://github.com/MarSeventh/CloudFlare-ImgBed
47FirmailplusWeb邮件客户端。https://github.com/fengyuanluo/firemailplus
加速与代理48Docker-ProxyDocker镜像国内加速服务。https://github.com/dqzboy/Docker-Proxy
49HubproxyGitHub和Docker统一加速服务。https://github.com/sky22333/hubproxy
50ghproxyGitHub代理/加速服务。https://github.com/WJQSERVER-STUDIO/ghproxy
资源与工具51Awesome-Selfhosted自托管服务的权威列表和资源库。https://github.com/awesome-selfhosted/awesome-selfhosted?tab=readme-ov-file
52计算器用于计算VPS剩余价值。https://github.com/hahabye/vps_jsq
53LandPPT基于LLM的演示文稿生成平台。https://github.com/sligter/LandPPT
赞(0) 打赏
未经允许不得转载:科技宝典 » VPS常用命令、常用程序