Debian11/12 安装qBittorrent-nox最新版本
1、可以使用以下命令安装qbittorrent-nox:
apt update && apt upgrade -y && apt autoremove -y
echo 'deb http://download.opensuse.org/repositories/home:/nikoneko:/test/Debian_12/ /' | sudo tee /etc/apt/sources.list.d/home:nikoneko:test.list
curl -fsSL https://download.opensuse.org/repositories/home:nikoneko:test/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_nikoneko_test.gpg > /dev/null
apt update && apt install qbittorrent-nox -y
2、创建一个systemd服务文件。你可以创建一个新的服务文件,例如/etc/systemd/system/qbittorrent-nox.service:
sudo nano /etc/systemd/system/qbittorrent-nox.service
3、在编辑器中,添加以下内容:
[Unit]
Description=qBittorrent Daemon
After=network.target
[Service]
Type=simple
User=<your_username>
ExecStart=/usr/bin/qbittorrent-nox --webui-port=8080
ExecStop=/usr/bin/killall qbittorrent-nox
Restart=on-failure
RestartSec=15
[Install]
WantedBy=multi-user.target
替换<your_username>为你的用户名。
4、重新加载systemd管理器配置,使其识别新的服务文件:
sudo systemctl daemon-reload
5、启用服务,使其在开机时自动启动:
sudo systemctl enable qbittorrent-nox
6、现在,你可以手动启动服务,测试是否正常工作:
sudo systemctl start qbittorrent-nox
7、检查服务状态,确认它正在运行:
sudo systemctl status qbittorrent-nox
以上步骤设置了一个名为qbittorrent-nox的systemd服务,在开机时将自动启动qBittorrent-noX。记得根据自己的需求调整ExecStart中的参数。
设置权限给单独的用户和组 sudo chown -R qbittorrent:qbittorrent /wwwroot/Downloads