VPS主机测评常用一键脚本Shell整理

150次阅读
没有评论

该文章基本汇集了 VPS 所需要的一切脚本。原帖来自全球主机交流论坛,由会员 @hostlocmjj 收集整理。主机大巴基于原帖搬运,进行了适当编辑整理并排版美化,对原作者表示感谢。

一、一键 DD 脚本

VPS 一键 DD 网络重装脚本,由 moeclub、leitbogioro 等大佬倾情出品,系统默认为 debian12,密码、端口自行修改设置。

moeclub 脚本

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 12 -v 64 -p 密码 -port 端口 -a -firmware

参考链接:Github – MoeClub


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 '密码'

参考链接:Github – leitbogioro

hostloc – Linux 一键重装支持 Debian 12,Ubuntu 22.04,史上最强

nodeseek – 史上最强,支持 Debian 12 raid 0 Ubuntu 24.04(测试中);512MB 内存安装 AlmaLinux/RockyLinux;CentOS 9 Fedora 39 AlpineLinux Kali Linux Windows 重装程序功能更新、bug 反馈贴(长期更新)


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

参考链接:Github – fcurrk

GIT.BETA.GS – 一键 DD 脚本


二、性能测试脚本

VPS 融合怪服务器测评脚本

curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh

参考链接:Github – spiritLHLS


NodeBench

bash <(curl -sL https://raw.githubusercontent.com/LloydAsp/NodeBench/main/NodeBench.sh)

脚本具有以下特点:

一键自动测试 Yabs,三网线路,区域解锁等功能

自动输出为 markdown 文件,方便论坛粘贴

自动传输到粘贴板,方便直接复制为 markdown 格式

参考链接:Github – NodeBench

NodeSeek – 搞了个 NodeBench,方便坛友发表测评文章


Yet-Another-Bench-Script:YABS

VPS 主机测评常用一键脚本 Shell 整理

运行方法:

curl -sL yabs.sh | bash

或者:

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

参考链接:Github – yet-another-bench-script


Geekbench 5 专测脚本

bash <(curl -sL gb5.top)

由 NodeSeek 会员 @Google 提供。

参考链接:Github – Geekbench 5 专测

NodeSeek – Geekbench 5 专测脚本


LemonBench

wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast

参考链接:Github – LemonBench


UnixBench.sh

wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh
chmod +x unixbench.sh
./unixbench.sh

由 teddysun(秋水逸冰)提供。

参考链接:Github – teddysun

秋水逸冰 – Linux 性能测试 UnixBench 一键脚本


三、网络测试脚本

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

三网回程线路显示。

参考链接:Github – Chennhaoo


backtrace

VPS 主机测评常用一键脚本 Shell 整理

curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh

参考链接:Github – backtrace


Bench.sh

wget -qO- bench.sh | bash

或者使用:

curl -Lso- bench.sh | bash

网络带宽及硬盘读写速率(国外部分 + 国内部分节点)

参考链接:Bench.sh


SuperBench.sh

wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash

网络带宽及硬盘读写速率(国内三网 +speedtest+fast)

参考链接:Github – oooldking


四、超售测试脚本

超售测试脚本

wget --no-check-certificate -O memoryCheck.sh https://raw.githubusercontent.com/uselibrary/memoryCheck/main/memoryCheck.sh && chmod +x memoryCheck.sh && bash memoryCheck.sh

由 hostloc 会员 @我能做两个小时 提供。

参考链接:Github – memoryCheck

hostloc – 超售检查一键脚本,实测真的有用


移除 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)

本脚本基于 CoiaPrant/MediaUnlock_Test 代码进行修改

支持 OS/Platform:CentOS 6+, Ubuntu 14.04+, Debian 8+, MacOS, Android with Termux

参考链接:Github – RegionRestrictionCheck


OpenAI 解锁检测

bash <(curl -Ls https://github.com/ludashi2020/OpenAI-Checker/raw/main/openai.sh)

参考链接:Github – OpenAI-Checker


六、BBR 脚本

一键开启 BBR

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

适用于较新的 Debian、Ubuntu。


Linux-NetSpeed

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh"
chmod +x tcp.sh
./tcp.sh

锐速 /bbrplus/bbr 魔改版,脚本已不更新,推荐使用 5.5 以上内核自带的 bbr 速度最佳。

参考链接:Github – Linux-NetSpeed


Linux-NetSpeed 魔改版

wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh

锐速 /BBRPLUS/BBR2 魔改版。

参考链接:Github – ylx2016


七、其他脚本

添加 swap 脚本

wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh

由 @moerats 提供。

参考链接:Rat’s Blog


zram 内存压缩脚本

curl -L https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh

参考链接:Github – addzram


cloudflare warp 脚本

VPS 主机测评常用一键脚本 Shell 整理

首次运行:

wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]

再次运行:

warp [option] [lisence]

连接 CF WARP 为服务器添加 IPv4/IPv6 网络。

参考链接:Gitlab – warp


fail2ban

wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log

服务器 ssh 防爆破。

参考链接:Github – Fail2ban


独立服务器硬盘时间

wget -q https://github.com/Aniverse/A/raw/i/a && bash a

参考链接:Github – Aniverse


八、常用软件脚本

Docker 安装

curl -sSL https://get.docker.com/ | sh

Aria2 一键安装脚本

wget -N git.io/aria2.sh && chmod +x aria2.sh && bash aria2.sh

X-UI

bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)

参考链接:Github – x-ui


宝塔一键挂载硬盘脚本

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

acme 生成免费证书

curl https://get.acme.sh | sh

腾讯云删除监控

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

本文参考阅读

hostloc –【NEW】常用脚本大全

hostloc –【2023 脚本收集】常用脚本备份

archives.vip –【脚本收集】常用脚本大全

正文完
 
主机大巴
版权声明:本文于2024-01-29转载自全球主机交流论坛,共计5610字。
转载提示:此文章非本站原创文章,若需转载请联系原作者获得转载授权。
评论(没有评论)