最近整理下一下常用的VPS 服務器一鍵腳本,VPS 服務器一鍵腳本是指預先編寫的腳本,可用于在 VPS 服務器上快速安裝和配置各種軟件和服務。這些腳本通常易于使用,即使是新手用戶也可以輕松操作,只需運行一個命令即可,即可完成軟件或服務的安裝和配置。本文收集的這些腳本在使用 VPS 服務器過程中使用得比較頻繁,比如DD網絡重裝腳本、 BBR、解鎖流媒體、超售檢測、回程去程腳本檢測等。腳本都是網上大佬編寫或是修改的,可能有些腳本更新不及時和長期不更新,這個不能怨作者,很多作者都是免費提供這些腳本,一般也沒啥時間去及時更新。友情建議:在使用 VPS 服務器一鍵腳本之前,請務必仔細閱讀腳本的文檔,并確保了解腳本的功能和使用方法。此外,建議在運行腳本之前先備份您的數據。

一鍵 DD 網絡重裝腳本:系統默認為debian12/h4>
moeclub 腳本
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 12 -v 64 -p 密碼 -port 端口 -a -firmware
leitbogioro 腳本(推薦)
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 '密碼'
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
服務器綜合測試腳本(融合怪)(推薦)
curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
性能測試腳本
YABS(推薦)
wget -qO- yabs.sh | bash
流量稀缺的服務器(不測試iperf網絡)
curl -sL yabs.sh | bash -s -- -i
我更喜歡geekbench5(不測試geekbench6)
curl -sL yabs.sh | bash -s -- -5
我喜歡geekbench5,但服務器流量稀缺(不測試geekbench6、不測試iperf網絡)
curl -sL yabs.sh | bash -s -- -5 -i
Geekbench 5 專測腳本 NS論壇大佬@google 開發
bash <(curl -sL gb5.top)
LemonBench
wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast
UnixBench.sh
wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh chmod +x unixbench.sh ./unixbench.sh
網絡測試腳本
hyperspeed 三網測速(推薦)(未開源)
bash <(curl -Lso- https://bench.im/hyperspeed)
AutoTrace 三網回程線路顯示(推薦)
wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh
backtrace 三網回程線路直接顯示(小白用這個)
curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh
Bench 網絡帶寬及硬盤讀寫速率(國外部分+國內部分節點)
wget -qO- bench.sh | bash
SuperBench.sh 網絡帶寬及硬盤讀寫速率(國內三網+speedtest+fast)
wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
超售測試腳本
wget --no-check-certificate -O memoryCheck.sh https://raw.githubusercontent.com/uselibrary/memoryCheck/main/memoryCheck.sh && chmod +x memoryCheck.sh && bash memoryCheck.sh
移除virtio_balloon模塊
rmmod virtio_balloon
內存填充測試
apt-get update apt-get install wget build-essential -y wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp gcc -l stdc++ memtester.cpp ./a.out
流媒體測試腳本
RegionRestrictionCheck(推薦)
bash <(curl -L -s check.unlock.media)
openai解鎖檢測
bash <(curl -Ls https://github.com/ludashi2020/OpenAI-Checker/raw/main/openai.sh)
BBR腳本
一鍵開啟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
Linux-NetSpeed(銳速/bbrplus/bbr魔改版)
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" chmod +x tcp.sh ./tcp.sh
BBRPLUS lkl-haproxy
lkl-linux+haproxy hack 版本 bbrplus,在 OpenVZ 工作良好。需要開啟 TUN/TAP 和至少 256M 空余內存。
將以下代碼復制到終端中,支持 Debian / Ubuntu / CentOS 鏡像。
wget --no-check-certificate --no-cache -O lkl-haproxy.sh https://github.com/mzz2017/lkl-haproxy/raw/master/lkl-haproxy.sh && bash lkl
執行后按提示輸入對應的內容。
[Info] 選擇你要使用的功能: 1.安裝 lkl bbrplus 2.檢查 lkl bbrplus運行狀態 3.卸載 lkl bbrplus 輸入數字以選擇:
NanQinLang
Debian
wget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-debian.sh bash tcp_nanqinlang-haproxy-debian.sh
CentOS
wget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-centos.sh bash tcp_nanqinlang-haproxy-centos.sh
NanQinLang/Rinetd
Debian 單網卡
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu.sh bash tcp_nanqinlang-rinetd-debianorubuntu.sh
多網卡
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh bash tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh
CentOS 單網卡
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos.sh bash tcp_nanqinlang-rinetd-centos.sh
多網卡
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos-multiNIC.sh bash tcp_nanqinlang-rinetd-centos-multiNIC.sh
腳本會自動檢測系統是否安裝了BBRv3,并支持自動安裝,如果已經安裝了將智能切換到管理內核界面,可以更新內核或者卸載內核。
科技 Lion BBR V3 一鍵腳本(Debian/Ubuntu)
apt update -y? && apt install -y curl
科技 Lion 官網一鍵腳本
curl -sS -O https://kejilion.pro/kejilion.sh && chmod +x kejilion.sh && ./kejilion.sh
GitHub 一鍵腳本
如果 crul 一鍵腳本出現大段亂碼!就用GitHub版本。
curl -sS -O https://raw.githubusercontent.com/kejilion/sh/main/kejilion.sh && chmod +x kejilion.sh && ./kejilion.sh
ylx大佬的銳速/BBRPLUS/BBR2
wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
moerats大佬的添加swap腳本
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
spiritlhl大佬的zram內存壓縮腳本
curl -L https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh
cloudflare warp腳本 添加IPv4/IPv6網絡(2023.12.10更新)
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]
fail2ban服務器ssh防爆破
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log
獨立服務器硬盤時間
wget -q https://github.com/Aniverse/A/raw/i/a && bash a
常用軟件腳本
Docker
curl -sSL https://get.docker.com/ | sh
Aria2一鍵安裝腳本
wget -N git.io/aria2.sh && chmod +x aria2.sh && bash aria2.sh
XUI
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)
寶塔一鍵掛載硬盤腳本
wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh
acme生成免費證書
curl https://get.acme.sh | sh
劍皇刷流量腳本
wget https://cdn.jsdelivr.net/gh/maintell/webBenchmark@releases/download/0.6/webBenchmark_linux_x64 chmod +x webBenchmark_linux_x64 ./webBenchmark_linux_x64 -c 64 -s http://鏈接.jpg
騰訊云刪除監控
sudo -i
systemctl stop tat_agent
systemctl disable tat_agent
/usr/local/qcloud/stargate/admin/uninstall.sh
/usr/local/qcloud/YunJing/uninst.sh
/usr/local/qcloud/monitor/barad/admin/uninstall.sh
rm -f /etc/systemd/system/tat_agent.service
rm -rf /usr/local/qcloud
rm -rf /usr/local/sa
rm -rf /usr/local/agenttools
rm -rf /usr/local/qcloud
process=(sap100 secu-tcs-agent sgagent64 barad_agent agent agentPlugInD pvdriver )
for i in ${process[@]}
do
for A in $(ps aux | grep $i | grep -v grep | awk '{print $2}')
do
kill -9 $A
done
done
測試 25 端口是否開放
telnet smtp.aol.com 25
測試 IPv4 優先還是 IPv6 優先
curl ip.p3terx.com





















