linux安装bt或者pt客户端qbittorrent-nox


这几天无聊整了个星际蜗牛 想着没事就来跑跑pt吧搜了半天都不知道怎么安装听说自带的包管理器里面的qbittorrent-nox 又有点老 就上网找了一下 并没有发现很好的安装教程 就来写一个 我是菜鸡 使用systemctl来管理启动
qbittorrent-nox github链接
qbittorrent-nox二进制文件可以直接运行 github链接
首先下载qbittorrent-nox二进制文件glibc版本

wget https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-4.3.4.1_v2.0.3/amd64-glibc-qbittorrent-nox
mv amd64-glibc-qbittorrent-nox /usr/bin #移动到目录

创建默认配置目录

mkdir -p ~/.config/qBittorrent

创建默认配置文件

touch ~/.config/qBittorrent/qBittorrent.conf

vi ~/.config/qBittorrent/qBittorrent.conf 编辑文件写入配置

[LegalNotice]
Accepted=true
 
[Preferences]
WebUI\Port=8080
General\Locale=zh

WebUIPort=8080的意思就是web端口可以自己定义
GeneralLocale=zh 默认语言
接下来就是Systemd service配置了

vi /etc/systemd/system/qbittorrent.service

写入以下配置

[Unit]
Description=qBittorrent-nox service
Wants=network-online.target
After=network-online.target nss-lookup.target

[Service]
Type=exec
User=root  #下面会讲
ExecStart=/usr/bin/qbittorrent-nox  #这里写二进制文件的绝对目录
Restart=on-failure
SyslogIdentifier=qbittorrent-nox

[Install]
WantedBy=multi-user.target

User=root 这里写用户名 逻辑是用户必须有 ~/.config/qBittorrent/qBittorrent.conf这个配置文件才行我这里写root是懒有需要可以自己去新建用户给权限

systemctl daemon-reload #重新载入systemctl 
systemctl start qbittorrent.service #启动qbittorrent
systemctl status qbittorrent.service #查看qbittorrent状态

理论上到这里就结束了 就可以在8080打开了 记得防火墙允许这个端口

声明:小小博客|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - linux安装bt或者pt客户端qbittorrent-nox


Carpe Diem and Do what I like