kryo

2025常用脚本

2025-12-17

1. 安装 Docker

一键执行官方脚本安装 Docker:

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

2. 安装 QB 刷流环境

一键安装脚本(参数可自定义:-u 用户名 -p 密码 -c 内存限制 -q QB 版本 -l libtorrent 版本):
bash <(wget -qO- https://raw.githubusercontent.com/jerry048/Dedicated-Seedbox/main/Install.sh) -u user -p password -c 1024 -q 4.3.9 -l v1.2.19

3. 安装 FileBrowser (FB)

通过 Docker 部署 FileBrowser,映射端口与文件目录:

docker run -d --name fb \
       --restart=unless-stopped \
       -e PUID=0 \
       -e PGID=0 \
       -e WEB_PORT=8088 \
       -p 8300:8088 \
       -v /root/filebrowser/config:/config \
       -v /home/wpforwg/qbittorrent/Downloads:/myfiles \
       80x86/filebrowser:2.10.3-amd64

关键说明:

  • 端口映射:宿主机 8300 端口 → 容器 8088 端口(可自行修改)

  • 目录挂载:

    • /root/filebrowser/config:存储 FileBrowser 配置文件

    • /home/wpforwg/qbittorrent/Downloads:映射为 FB 可管理的文件目录(按需修改)

4. 服务器性能/网络测试

4.1 YABS 综合测试(性能+网络)

curl -sL yabs.sh | bash

4.2 Check.Place 网络测试

bash <(curl -Ls https://Check.Place) -I

4.3 GB5 跑分测试

bash <(curl -sL bash.icu/gb5)

4.4 NodeQuality 节点质量测试

bash <(curl -sL https://run.NodeQuality.com)

5. 科学上网脚本

5.1 八合一 V2Ray 代理脚本

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

5.2 3X-UI 面板脚本

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

6. Warp 一键脚本(二选一)

6.1 fscarmen 版 Warp 菜单脚本

wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

6.2 Misaka-blog 版 Warp 脚本

wget -N https://gitlab.com/Misaka-blog/warp-script/-/raw/main/warp.sh && bash warp.sh

7. Debian 12 配置 SSH 密钥登录(禁用密码登录)

7.1 创建 SSH 密钥目录并添加公钥

# 创建 .ssh 目录(若不存在)
mkdir -p ~/.ssh

# 编辑 authorized_keys 文件,粘贴你的 SSH 公钥
nano ~/.ssh/authorized_keys

保存退出:Ctrl+O → 回车 → Ctrl+X

7.2 修改 SSH 配置文件

nano /etc/ssh/sshd_config

将以下配置项修改为:

PasswordAuthentication no  # 禁用密码登录(仅保留密钥登录时开启)
PubkeyAuthentication yes   # 启用公钥认证
AuthorizedKeysFile      %h/.ssh/authorized_keys  # 指定公钥文件路径

7.3 重启 SSH 服务生效

systemctl restart sshd

注意:操作前确保公钥已正确配置,避免无法登录;如需临时恢复密码登录,将 PasswordAuthentication 改为 yes 并重启 sshd

8. 一键 VPS 系统重装脚本

8.1 下载重装脚本

curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O ${_##*/} $_

8.2 执行重装(支持的系统版本)

bash reinstall.sh

支持的系统及版本列表:

anolis      7|8|23
rocky       8|9|10
oracle      8|9|10
almalinux   8|9|10
opencloudos 8|9|23
centos      9|10
fedora      42|43
nixos       25.05
debian      9|10|11|12|13
alpine      3.19|3.20|3.21|3.22
opensuse    15.6|16.0|tumbleweed
openeuler   20.03|22.03|24.03|25.09
ubuntu      16.04|18.04|20.04|22.04|24.04|25.10[--minimal]
kali
arch
gentoo
aosc
fnos
redhat      --img="http://access.cdn.redhat.com/xxx.qcow2"

示例:重装为 Debian 12 → bash reinstall.sh debian 12

9. Debian 开启 BBR 网络加速

9.1 检查并加载 BBR 模块

# 检查 BBR 模块是否加载,未加载则手动加载
lsmod | grep tcp_bbr || modprobe tcp_bbr

# 设置开机自动加载 BBR 模块
echo "tcp_bbr" >> /etc/modules-load.d/bbr.conf

9.2 清理原有重复配置(避免冲突)

sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf

9.3 写入 BBR 永久配置

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

9.4 使配置立即生效

sysctl -p

9.5 验证 BBR 是否生效

sysctl net.ipv4.tcp_congestion_control net.core.default_qdisc

如有任何知识产权、版权问题或理论错误,还请指正。

转载请注明原作者及以上信息。

返回首页