debian系统编译 qBittorrent 4.1.9

发布于 2020-03-05  209 次阅读


系统支持debian8以上,版本4.1.9

1.安裝libtorrent

先安装依赖:

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

然后安装 ibtorrent 1.1.13: 适用于qBittorrent4.0.0或更新版本

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-libgeoip=system
make -j$(nproc)
make install
ldconfig

2.安裝qBittorrent 4.1.9

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

3.开机启动

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的webUI

qbittorrent-nox

访问一下web页面,port8080,用户名admin,密码adminadmin, 给下载目录777权限 防止出错。
再次后台运行,防止ssh关掉后结束qBittorrent进程 。

systemctl start qbittorrent.service

其他问题

1.提示 Qt5 qmake 版本低

apt-get remove qtbase5-dev qttools5-dev-tools
echo "deb http://deb.debian.org/debian stretch main" >> /etc/apt/sources.list
apt-get update
apt-get install qtbase5-dev qttools5-dev-tools
sed -i '$d' /etc/apt/sources.list
apt-get update

2.缺少 zlib

apt-get install zlib1g-dev

3.boostlib 错误

apt-get remove libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev
echo "deb http://deb.debian.org/debian stretch main" >> /etc/apt/sources.list
apt-get update
apt-get install libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev
sed -i '$d' /etc/apt/sources.list
apt-get update

4.修改 WebUI 端口

nano .config/qBittorrent/qBittorrent.conf

5.忘记密码

/root/.config/qBittorrent/qBittorrent.conf
WebUI\Password_ha1=@ByteArray(5ebe2294ecd0e0f08eab7690d2a6ee69)
5ebe2294ecd0e0f08eab7690d2a6ee69=secret