Debian安装qBittorrent

发布于 2020-10-26  138 次阅读


新:

安装qb-nox版本

创建默认配置目录

mkdir -p ~/.config/qBittorrent

创建配置文件

touch ~/.config/qBittorrent/qBittorrent.conf

编辑文件

nano ~/.config/qBittorrent/qBittorrent.conf
[LegalNotice]
Accepted=true

[Preferences]
WebUI\Port=8080
General\Locale=zh

源自:

GitHub - userdocs/qbittorrent-nox-static: A build script for qBittorent nox static.

mkdir -p ~/bin && source ~/.profile
wget -qO ~/bin/qbittorrent-nox https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-4.3.4.1_v1.2.13/amd64-glibc-qbittorrent-nox
chmod 700 ~/bin/qbittorrent-nox
~/bin/qbittorrent-nox

Systemd service

vi /etc/systemd/system/qbittorrent.service
[Unit]

Description=qBittorrent-nox

After=network.target



[Service]

User=root

Type=forking

RemainAfterExit=yes

ExecStart=/root/bin/qbittorrent-nox -d



[Install]

WantedBy=multi-user.target
systemctl enable --now qbittorrent.service
systemctl status qbittorrent.service

旧:

安装依赖libtorrent 1.1.13

libtorrent 1.1.13适用于qBittorrent4.0.0-4.1.9。

apt-get update

apt-get install build-essential pkg-config automake libtool git libgeoip-dev python3 python3-dev -y

apt-get install libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev libssl-dev -y

apt-get install qtbase5-dev qttools5-dev-tools libqt5svg5-dev zlib1g-dev -y

小内存机器请先设置虚拟内存。

wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_1_13/libtorrent-rasterbar-1.1.13.tar.gz

tar xf libtorrent-rasterbar-1.1.13.tar.gz

cd libtorrent-rasterbar-1.1.13

./configure --disable-debug --enable-encryption --with-boost-system=lib

make -j$(nproc)

make install

ldconfig

安装qBittorrent 4.1.9

cd
wget https://github.com/qbittorrent/qBittorrent/archive/release-4.1.9.tar.gz
tar xf release-4.1.9.tar.gz
cd qBittorrent-release-4.1.9
./configure --disable-gui --disable-debug
make -j$(nproc)
make install

设置开机启动

nano /etc/systemd/system/qbittorrent.service
[Unit]
Description=qBittorrent Daemon Service
After=network.target

[Service]
LimitNOFILE=512000
User=root
ExecStart=/usr/local/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox

[Install]
WantedBy=multi-user.target
systemctl enable qbittorrent.service

启动qBittorrent

qbittorrent-nox

访问web页面,ip:8080,用户名admin,密码adminadmin,更改语言、下载地址等设置后,Ctrl+C退出。

为防止出错,建议给下载目录0777权限。

在后台运行:

systemctl start qbittorrent.service

Love is merely a madness.