Loading... ## 前言 以下为安装最新或指定版本qBittorrent教学。 适用于Ubuntu18或更新版本,Debian10或更新版本 适用于qBittorrent4.1.9-4.3.0.1或更新版本 ## 安装须知 [https://github.com/arvidn/libtorrent](https://github.com/arvidn/libtorrent) libtorrent是qBittorrent必要的后端程序,对软件性能有直接影响。 ## 安装libtorrent 先安装依赖包: ``` apt update apt install build-essential pkg-config automake libtool git libgeoip-dev python3 python3-dev apt install libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev libssl-dev apt install qtbase5-dev qttools5-dev-tools libqt5svg5-dev zlib1g-dev ``` 安装libtorrent 1.2.19: ``` wget https://github.com/arvidn/libtorrent/releases/download/v1.2.19/libtorrent-rasterbar-1.2.19.tar.gz tar xf libtorrent-rasterbar-1.2.19.tar.gz cd libtorrent-rasterbar-1.2.19 ./configure --disable-debug --enable-encryption --with-libgeoip=system CXXFLAGS=-std=c++14 make -j$(nproc) make install ldconfig ``` ## 安装qBittorrent [https://github.com/qbittorrent/qBittorrent/tags](https://github.com/qbittorrent/qBittorrent/tags) 可自行选择版本 qBittorrent4.3.9为例 ``` wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-4.3.9.tar.gz tar xf release-4.3.9.tar.gz cd qBittorrent-release-4.3.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(首次启动请按y确认条款) ``` qbittorrent-nox ``` 按Ctrl+C退出 后台运行qBittorrent: ``` systemctl start qbittorrent.service ``` ## 安装完成 访问WebUI:http://你的IPADDRESS:8080/ 默认用户名:admin 默认密码:adminadmin 关闭qBittorrent命令: ``` systemctl stop qbittorrent.service ``` 启动qBittorrent命令: ``` systemctl start qbittorrent.service ``` 重启qBittorrent命令: ``` systemctl restart qbittorrent.service ``` ## 创建下载文件夹和设置权限 ``` mkdir /home/Downloads chmod 777 /home/Downloads ``` 把下载路径设置到/home/Downloads就OK了! Last modification:January 9, 2024 © Allow specification reprint Support Appreciate the author Like 2 如果觉得我的文章对你有用,请随意赞赏