方法2:Debian自带源安装apt:
apt-get install qbittorrent-nox
nano /etc/rc.local #编辑 rc.local 脚本,在 exit 0 前面(前一行)添加以下斜体内容并保存
qbittorrent-nox -d
设置开机启动:
nano /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
[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
启动 qbittorrent 首次启动 请安 y 接受确认
qbittorrent-nox
systemctl start qbittorrent-nox #启动 qbittorrent-nox 并创建服务配置 systemctl enable qbittorrent-nox #设置开机自动启动 qbittorrent-nox
上面命令不行尝试下面:
启用以上设置:
systemctl enable qbittorrent.service
启动 qbittorrent 首次启动 请安 y 接受确认
qbittorrent-nox
接着按 Ctrl+c 退出,启动后台运行
systemctl start qbittorrent.service
至此 qbittorrent 安裝完成 访问 WebUI:http://你的IP:8080/ 默认用户名:admin 默认密码:adminadmin
关闭 qBittorrent 命令:
systemctl stop qbittorrent.service
启动 qBittorrent 命令:
systemctl start qbittorrent.service
重启 qBittorrent 命令:
systemctl restart qbittorrent.service
更新系统依赖
apt update && apt upgrade
方法1:Debian编译安装:
安装所需依赖
apt-get -y install build-essential pkg-config automake libtool git libgeoip-dev python3 python3-dev libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev libssl-dev qtbase5-dev qttools5-dev-tools libqt5svg5-dev zlib1g-dev nano
安裝 libtorrent 1.2.14:
wget https://github.com/arvidn/libtorrent/releases/download/v1.2.14/libtorrent-rasterbar-1.2.14.tar.gz
tar xf libtorrent-rasterbar-1.2.14.tar.gz
cd libtorrent-rasterbar-1.2.14
./configure --disable-debug --enable-encryption --with-libgeoip=system
make -j$(nproc)
make install
ldconfig
安裝 qBittorrent 4.35
wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-4.3.5.tar.gz
tar xf release-4.3.5.tar.gz
cd qBittorrent-release-4.3.5
./configure --disable-gui --disable-debug
make -j$(nproc)
make install