原文:https://hostloc.com/thread-860468-1-1.html
Bash安装
查看版本
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
升级系统
apt update && apt upgrade
apt install automake build-essential libtool pkg-config
安装 libtorrent
https://github.com/arvidn/libtorrent/releases
https://github.com/arvidn/libtorrent/releases/download/v2.0.4/libtorrent-rasterbar-2.0.4.tar.gz
apt install libssl-dev libgeoip-dev libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev
cd /usr/local/src
wget https://github.com/arvidn/libtorrent/releases/download/v1.2.14/libtorrent-rasterbar-1.2.14.tar.gz
tar zxvf 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
https://github.com/qbittorrent/qBittorrent/releases
apt install qtbase5-dev qttools5-dev-tools libqt5svg5-dev zlib1g-dev
cd /usr/local/src
wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-4.3.5.tar.gz
tar zxvf release-4.3.5.tar.gz
cd qBittorrent-release-4.3.5
./configure --disable-gui --disable-debug
make -j$(nproc)
make install
启动 qbittorrent
qbittorrent-nox
首次启动 请安 y 接受确认,接着按 Ctrl+c 退出,启动后台运行
创建服务
cat << "EOF" > /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
EOF
启用服务
systemctl enable qbittorrent.service
启动服务
systemctl start qbittorrent.service
访问 WebUI:
http://你的IP:8080/
默认用户名:admin
默认密码:adminadmin
docker安装
一键脚本 ,选择 7 自动安装,而且支持 ARM64 甲骨文这些
wget git.io/autopt.sh && bash autopt.sh