Skip to content
Spotify - 每月低于 10 元

VPS 常用脚本及配置

TIP

以下的大部分脚本都可以使用多合一脚本直接运行 curl -Lso zc.sh https://link.zhichao.org/sh && chmod +x zc.sh && ./zc.sh

常用软件

Docker

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

测速脚本

HyperSpeed

sh
# 三网测速
bash <(curl -Lso- https://bench.im/hyperspeed)

Bench

sh
# 国内外测速 + 硬盘读写
curl -Lso- bench.sh | bash

路由追踪

NextTrace

安装

sh
# /usr/local/bin/nexttrace
curl nxtrace.org/nt |bash

使用

sh
# 基本使用
nexttrace ip/domain
# 北上广(电信+联通+移动+教育网)IPv4 / IPv6 ICMP 快速测试
nexttrace --fast-trace

BackTrace

安装

sh
# 三网回程直接显示
# /usr/bin/backtrace
curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh

使用

sh
backtrace

解锁测试

流媒体解锁

sh
bash <(curl -L -s check.unlock.media)

OpenAI 解锁

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

MTProto

安装

sh
bash <(wget -qO- https://git.io/mtg.sh)

卸载

sh
systemctl disable mtg
systemctl stop mtg
rm -f /usr/local/bin/mtg /etc/systemd/system/mtg.service /etc/mtg.toml

Chrony 时间同步

安装

sh
apt-get install chrony

使用

ini
# /etc/chrony/chrony.conf
# 添加 NTP 服务器
server ntp.aliyun.com minpoll 4 maxpoll 10 iburst
server us.pool.ntp.org minpoll 4 maxpoll 10 iburst

启动

sh
systemctl start chronyd
systemctl enable chronyd

验证

sh
chronyc tracking
chronyc -n sources -v

BBR

sh
# Linux 内核版本大于 4.9
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

更新内核

sh
bash <(curl -Lso- https://git.io/kernel.sh)
关注微信公众号搬瓦工 - 美国 CN2 优化线路
你认为这篇文章怎么样?
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0

预览:

评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v3.1.3