海运的博客

debian11或pve编译安装最新版qbittorrent-nox

发布时间:February 5, 2023 // 分类: // No Comments

安装编译环境:

apt install build-essential pkg-config automake libtool

编译libtorrent-rasterbar-1.2.18:

apt install libboost-system-dev libssl-dev
#也可使用git clone最新代码
#git clone --branch RC_1_2 --depth=1 --recurse-submodules https://github.com/arvidn/libtorrent.git
wget https://github.com/arvidn/libtorrent/releases/download/v1.2.18/libtorrent-rasterbar-1.2.18.tar.gz
tar zxf libtorrent-rasterbar-1.2.18.tar.gz 
cd libtorrent-rasterbar-1.2.18/  
./configure --prefix=/usr/local/libtorrent-1.2.18 CXXFLAGS=-std=c++14  
make -j$(nproc) && make install

编译qbittorrent-nox4.5.0:

apt install qtbase5-dev qttools5-dev libqt5svg5-dev zlib1g-dev
#也可使用git clone最新代码
#git clone --branch v4_5_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-4.5.0.tar.gz
tar zxf release-4.5.0.tar.gz 
cd qBittorrent-release-4.5.0/  
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.18/include/               
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.18/lib/pkgconfig
./configure --prefix=/usr/local/qbittorrent-4.5.0 --disable-gui 
make -j$(nproc) && make install

qbittorrent 4.5.0版本web不能显示中文解决:

sed -i 's/value="zh">/value="zh_CN">/' src/webui/www/private/views/preferences.html

如只安装一个版本的libtorren启动qbittorrent:

echo '/usr/local/libtorrent/lib' > /etc/ld.so.conf.d/libtorrent-x86_64.conf 
ldconfig
/usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

多个版本libtorren:

LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/ /usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

systemd service添加:

Environment="LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/"

用cmake编译libtorrent-2.0版本及qbittorrent4.5.0:

apt install cmake ninja-build
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-2.0.8 -DCMAKE_CXX_STANDARD=14 
cmake --build build
cmake --install build
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-2.0.8/include/              
export PKG_CONFIG_PATH=/usr/local/libtorrent-2.0.8/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.0-lt20 -DGUI=OFF -DSTACKTRACE=OFF 
cmake --build build
cmake --install build

debian11使用qt6编译qbittorrent,需开启bullseye-backports源:

apt install qt6-base-dev qt6-tools-dev zlib1g-dev -t bullseye-backports
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.1 -DGUI=OFF -DSTACKTRACE=OFF -DQT6=ON

如要在其它机器上运行需安装依赖:

apt install libqt6network6 libqt6sql6 libqt6xml6 libqt6core6 -t bullseye-backports 

libtorrent-2.0.8使用注意,默认磁盘io类型为内存映射文件,qbittorrent占用shr内存很大,且关闭系统缓存后下载上传很慢。
将磁盘io更改为posix无此问题。

经典版本4.3.9:

#wget https://github.com/arvidn/libtorrent/releases/download/v1.2.14/libtorrent-rasterbar-1.2.14.tar.gz
#tar zxf libtorrent-rasterbar-1.2.14.tar.gz 
#cd libtorrent-rasterbar-1.2.14/
git clone --branch RC_1_2 https://github.com/arvidn/libtorrent.git
cd libtorrent
#qbittorrent4.39发布时使用的libtorrent版本
git checkout 28ebc276224021d93d958e2f2de445c35898a23e
git submodule update --init --recursive
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-1.2.14 -DCMAKE_CXX_STANDARD=14 
cmake --build build  
cmake --install build
git clone --branch v4_3_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
cd qBittorrent/
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.14/include/  
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.14/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.3.9 -DGUI=OFF -DSTACKTRACE=OFF
cmake --build build  
cmake --install build

https://web.archive.org/web/20211102073721/https://www.qbittorrent.org/download.php
https://github.com/qbittorrent/qBittorrent/wiki#compilation
https://github.com/qbittorrent/qBittorrent/wiki/Compilation:-Debian-and-Ubuntu
https://github.com/qbittorrent/qBittorrent/wiki/Compilation-with-CMake:-common-information
https://github.com/arvidn/libtorrent/blob/RC_2_0/docs/building.rst#building-with-cmake

ubuntu18.04编译qbittorrent4.13和libtorrent1.0.11

发布时间:October 5, 2018 // 分类:PT // No Comments

qbittorrent4在使用libtorrent最新版本1.1.9版本时有诸多问题,编译使用1.0.11稳定版本试试。
安装编译环境及libtorrent依赖:

apt-get install build-essential pkg-config automake libtool git
apt-get install libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev libssl-dev libgeoip-dev

编译libtorrent:

git clone https://github.com/arvidn/libtorrent.git
#之前系统版本可直接下载源码使用,18.04需修改include/libtorrent/export.hpp替换boost/config/为boost/config/detail/
#https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_0_11/libtorrent-rasterbar-1.0.11.tar.gz
cd libtorrent
git checkout origin/RC_1_0
./autotool.sh
./configure --prefix=/usr/local/libtorrent CXXFLAGS=-std=c++11
make clean && make -j$(nproc)
make install
echo '/usr/local/libtorrent/lib' > /etc/ld.so.conf.d/libtorrent-x86_64.conf 
ldconfig
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent/include/
export PKG_CONFIG_PATH=/usr/local/libtorrent/lib/pkgconfig/

安装qbittorrent依赖及编译:

apt-get install qtbase5-dev qttools5-dev-tools libqt5svg5-dev zlib1g-dev
wget https://github.com/qbittorrent/qBittorrent/archive/release-4.1.3.tar.gz
tar zxvf release-4.1.3.tar.gz 
cd qBittorrent-release-4.1.3/
./configure --prefix=/usr/local/qbittorrent --disable-gui
make clean && make -j$(nproc)
make install
export PATH=$PATH:/usr/local/qbittorrent/bin/
echo 'export PATH=$PATH:/usr/local/qbittorrent/bin/' >> ~/.bashrc

ubuntu 通过ppa源安装最新版qbittorrent

发布时间:September 28, 2018 // 分类:PT // No Comments

添加源时出错:

add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
ERROR: '~qbittorrent-team' user or team does not exist.

确认ppa用户名没错后用curl测试http获取是否正常,提示证书无效:

curl 'https://launchpad.net/~qbittorrent-team/+archive/ubuntu/qbittorrent-stable'
curl: (60) SSL certificate problem: certificate is not yet valid

安装证书后再试:

apt-get install ca-certificates

依旧出现错误,查看系统时间不对,通过ntp更新时间解决:

ntpdate ntp.ubuntu.com

或查看Technical details about this PPA,手工添加源和gpg key。

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 401E8827DA4E93E44C7D01E6D35164147CA69FC4
cat <<EOF > /etc/apt/sources.list.d/qbittorrent-ppa.list
deb https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu `lsb_release -c -s` main
deb-src https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu `lsb_release -c -s` main
EOF

Centos7编译安装qbittorrent4.1.2

发布时间:September 13, 2018 // 分类:PT // 3 Comments

安装编译工具及依赖:

yum -y groupinstall "Development Tools"
yum -y install qt-devel boost-devel openssl-devel qt5-qtbase-devel qt5-linguist

安装libtorrent,libtorrent1.1.x版本会出现invalid port问题,参考https://tieba.baidu.com/p/5864985886

wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_1_9/libtorrent-rasterbar-1.1.9.tar.gz
tar -zxf libtorrent-rasterbar-1.1.9.tar.gz
cd libtorrent-rasterbar-1.1.9
#修改为固定端口号
#sed -i "s/i2p ? 1 : tracker_req().listen_port/8999/" src/http_tracker_connection.cpp
./configure --prefix=/usr/local/libtorrent CXXFLAGS=-std=c++11
make && make install
echo '/usr/local/libtorrent/lib' > /etc/ld.so.conf.d/libtorrent-x86_64.conf 
ldconfig
#export LD_LIBRARY_PATH=/usr/local/libtorrent/lib/
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent/include/
export PKG_CONFIG_PATH=/usr/local/libtorrent/lib/pkgconfig/

安装qbittorrent:

wget https://github.com/qbittorrent/qBittorrent/archive/release-4.1.2.tar.gz
tar zxf release-4.1.2.tar.gz
cd qBittorrent-release-4.1.2/
./configure --prefix=/usr/local/qbittorrent --disable-gui
make && make install
export PATH=$PATH:/usr/local/qbittorrent/bin/ 
echo 'export PATH=$PATH:/usr/local/qbittorrent/bin/' >> ~/.bashrc 

配置文件:

cat > ~/.config/qBittorrent/qBittorrent.conf <<- EOM
[AutoRun]
enabled=false
program=

[BitTorrent]
IPFilter\Enabled=false
Session\AnnounceToAllTiers=true
Session\BTProtocol=TCP
Session\MultiConnectionsPerIp=true
Session\SendBufferLowWatermark=7680
Session\SendBufferWatermark=15360
Session\SendBufferWatermarkFactor=150
Session\SuggestMode=true

[LegalNotice]
Accepted=true

[Preferences]
Advanced\AnnounceToAllTrackers=true
Advanced\osCache=true
Bittorrent\AddTrackers=false
Bittorrent\DHT=false
Bittorrent\Encryption=0
Bittorrent\LSD=false
Bittorrent\MaxConnecs=2000
Bittorrent\MaxConnecsPerTorrent=200
Bittorrent\MaxRatioAction=0
Bittorrent\MaxUploads=1000
Bittorrent\MaxUploadsPerTorrent=100
Bittorrent\PeX=false
Bittorrent\uTP=false
Bittorrent\uTP_rate_limited=true
Connection\GlobalDLLimit=30000
Connection\GlobalDLLimitAlt=-1
Connection\GlobalUPLimit=30000
Connection\GlobalUPLimitAlt=-1
Connection\MaxHalfOpenConnec=200
Connection\PortRangeMin=8999
Connection\ResolvePeerCountries=false
Connection\ResolvePeerHostNames=false
Connection\UPnP=false
Downloads\PreAllocation=false
Downloads\SavePath=/home/download/
Downloads\ScanDirsV2=@Variant(\0\0\0\x1c\0\0\0\0)
DynDNS\DomainName=changeme.dyndns.org
DynDNS\Enabled=false
DynDNS\Password=
DynDNS\Service=0
DynDNS\Username=
General\Locale=en
General\UseRandomPort=false
IPFilter\Enabled=false
MailNotification\email=
MailNotification\enabled=false
MailNotification\password=
MailNotification\req_auth=true
MailNotification\req_ssl=false
MailNotification\smtp_server=smtp.changeme.com
MailNotification\username=
Queueing\MaxActiveDownloads=500
Queueing\MaxActiveTorrents=500
Queueing\MaxActiveUploads=500
Queueing\QueueingEnabled=false
WebUI\Address=0.0.0.0
WebUI\AuthSubnetWhitelist=@Invalid()
WebUI\AuthSubnetWhitelistEnabled=false
WebUI\CSRFProtection=true
WebUI\ClickjackingProtection=true
WebUI\HTTPS\Enabled=false
WebUI\LocalHostAuth=true
WebUI\Port=8080
WebUI\ServerDomains=
WebUI\UseUPnP=false
EOM

参考:https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qbittorrent-nox-for-CentOS-from-source

centos下pt软件qbittorrent使用

发布时间:April 2, 2018 // 分类:PT // No Comments

能完epel源可直接安装:

yum install qbittorrent-nox -y

启动:

qbittorrent-nox --webui-port=8080 -d

通过浏览器访问:ip:8080,默认账号:admin/adminadmin

分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...