Debian系统简单安装qbittorrent-nox

实用教程 admin 5个月前 (12-23) 316次浏览 0个评论

前言

之前我们写了一系列PT相关的教程,详情如下:

简单手动安装transmission并解决权限问题

docker安装transmission、qbittorrent、flexget、portainer

Transmission制作种子文件并发布到 PT 站

Transmission状态提示错误:UDP Failed to set receive/send buffer

ipv4被标记盒子,ipv6没被标记的服务器如何刷PT

qBittorrent 设置教程

配置Docker安装的qBittorrent仅使用IPv6

使用docker-compose安装qbittorrent

qbittorrent因其高效的上传速率而深得广大PT玩家的喜爱,小白个人认为最简单的使用方法是直接docker-compose运行,正好最近有docker用不溜的老哥问能不能直接安装,当然可以,今天我来看看Debian系统如何安装qbittorrent-nox。

apt安装qbittorrent-nox

apt update -y
apt install qbittorrent-nox -y

配置qbittorrent-nox进程守护

作为小白,这里我们粗暴的使用root用户运行,大佬勿喷……

复制以下代码块的全部内容并一次性粘贴至 SSH 窗口:

cat << EOF > /etc/systemd/system/qbittorrent-nox.service
[Unit]
Description=qBittorrent Command Line Client
After=network.target
[Service]
Type=forking
User=root
ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=9092
ExecStop=/usr/bin/kill -w qbittorrent-nox
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF

此处8080端口自定义即可。然后:

# 更新配置
systemctl daemon-reload
# 启动服务
systemctl start qbittorrent-nox
# 开机自启
systemctl enable qbittorrent-nox
# 查看状态
systemctl status qbittorrent-nox

至此,在浏览器中输入服务器的IP和qbittorrent-nox的端口就可以进入了,用户名是admin,用户密码:adminadmin。强烈建议进去之后,立马修改用户名和用户密码。

后续

用户问题

刚刚我们说了,小白直接粗暴地使用root用户,但是安全意识强的老哥肯定不会这样,而是使用相关用户来运行qb,这里就又设计的用户和用户组权限的问题了,我们大概看下吧:

1. 添加专属的qbittorrent-nox用户组

adduser --system --group qbittorrent-nox # Debian 11及旧版本
adduser --home /home/qbittorrent-nox --system --group qbittorrent-nox # Debian 12新版本

2. 将当前用户添加进qbittorrent-nox用户组中,注意: “your-username”是你当前用户的名字,比如root账户就是root,ubuntu账户就是ubuntu,可以通过命令whoami获取。

adduser your-username qbittorrent-nox

3. 与之相对应的进程守护文件也要稍微修改下:

cat << EOF > /etc/systemd/system/qbittorrent-nox.service
[Unit]
Description=qBittorrent Command Line Client
After=network.target
[Service]
Type=forking
User=qbittorrent-nox 
Group=qbittorrent-nox
ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=8080
ExecStop=/usr/bin/kill -w qbittorrent-nox
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF

qbittorrent-nox-static

apt源的qb版本不是最新的,我们也可以通过开源项目qbittorrent-nox-static来安装新版的qb,项目地址如下:qbittorrent-nox-static

1. 下载:

我们可前往项目主页下载最新版本,最新版本为qbittorrent 4.6.2 libtorrent 2.0.9,我们直接下载:

# 下载qbittorrent-nox二进制文件,并放到/usr/local/bin目录下面
wget -qO /usr/local/bin/qbittorrent-nox https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-4.6.2_v2.0.9/$(uname -m)-qbittorrent-nox
# 二进制文件700权限
chmod 700 /usr/local/bin/qbittorrent-nox

2. 添加进程守护:

cat << EOF > /etc/systemd/system/qbittorrent-nox.service
[Unit]
Description=qBittorrent Command Line Client
After=network.target
[Service]
Type=forking
User=root
ExecStart=/usr/local/bin/qbittorrent-nox -d --webui-port=8080
ExecStop=/usr/bin/kill -w qbittorrent-nox
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF

References

debian 9/10/11安装qbittorrent

Debian 11安装qbittorrent-nox并设置Nginx反代

debian上安装qBittorrent

Debian安装qbittorrent-nox

在DEBIAN 10上安装qBittorrent在线实操教程

Delian安装 qbittorrent-nox 实现WEBUI访问下载

使用Debian系统编译安装qBittorrent-nox

Debian 11安装qbittorrent-nox并设置Nginx反代

搭建qbittorrent-nox-static


VPS小白 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Debian系统简单安装qbittorrent-nox
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址