项目地址:https://github.com/userdocs/qbittorrent-nox-static
直接运行:
bash <(curl -sL https://usrdx.github.io/s/qi.bash)
- 如果你想用稳定一点的 libtorrent 1.2(很多人更稳):
bash <(curl -sL https://usrdx.github.io/s/qi.bash) -lt v1
- 将路径添加到配置文件
执行下面的命令,将~/bin 目录加入到你的 PATH 中:
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
- 使配置立即生效
执行以下命令,让刚才的修改在当前终端窗口生效:
source ~/.bashrc
- 验证是否成功
现在,尝试再次运行该命令:
qbittorrent-nox
----------
### systemd 自启动
① 创建服务文件
nano /etc/systemd/system/qbittorrent.service
写入:
[Unit]
Description=qbittorrent-nox
After=network.target
[Service]
Type=simple
User=root
ExecStart=/root/bin/qbittorrent-nox
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
② 启用服务
systemctl daemon-reload
systemctl enable qbittorrent
systemctl start qbittorrent
检查状态
systemctl status qbittorrent
脚本会自动:
- 判断 Ubuntu 20
- 下载对应 x86_64 / arm 版本
- 自动安装到 ~/bin
- 不需要你处理依赖(因为是 static build)
- 官方也明确写了支持 Debian / Ubuntu 系列系统