2020年2月28日星期五

Ubuntu/Debian安装qbittorrent-nox bt

更新源并安装qbittorrent-nox
sudo apt-get update && sudo apt-get install qbittorrent-nox -y

设置开机启动
创建开机启动服务脚本
sudo apt-get install vim -y && vim /etc/systemd/system/qbittorrent-nox.service

写入以下内容:

[Unit]
Description=qBittorrent-nox
After=network.target
[Service]
User=root
Type=forking
RemainAfterExit=yes
ExecStart=/usr/bin/qbittorrent-nox -d
[Install]
WantedBy=multi-user.target

Ubuntu
安装add-apt-repository命令
sudo apt-get update && sudo apt-get install software-properties-common -y

添加qbittorrent-nox的PPA软件源
# qBittorrent 稳定版
sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
# qBittorrent 测试版
sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-unstable

安装qbittorrent-nox
sudo apt-get update && sudo apt-get install qbittorrent-nox -y

设置开机启动
创建开机启动服务脚本:
sudo apt-get install vim -y && vim /etc/systemd/system/qbittorrent-nox.service

写入以下内容:

[Unit]
Description=qBittorrent-nox
After=network.target
[Service]
User=root
Type=forking
RemainAfterExit=yes
ExecStart=/usr/bin/qbittorrent-nox -d
[Install]
WantedBy=multi-user.target

相关命令:
# 修改qbittorrent-nox.service文件后重新载入
sudo systemctl daemon-reload
#启动
sudo systemctl start qbittorrent-nox
#停止
sudo systemctl stop qbittorrent-nox
重启
systemctl restart qbittorrent-nox
#设置开机启动
sudo systemctl enable qbittorrent-nox
#查看状态
sudo systemctl status qbittorrent-nox

默认账号:admin 密码:adminadmin
默认登陆网址:ip:8080

忘记登陆密码时打开/user/.config/qBittorrent/qBittorrent.conf文件,删除“WebUI\Password_PBKDF2”这一行保存,重启qbittorrent-nox后即重置为默认密码。