原创文章,转载请注明出处
https://qiedd.com/

开始安装

更新GCC

yum groupinstall "Development Tools"
yum install qt-devel boost-devel openssl-devel qt5-qtbase-devel qt5-linguist
yum install centos-release-scl -y
yum install devtoolset-8 -y
scl enable devtoolset-8 bash

更新boost

wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
tar zxvf boost_1_72_0.tar.gz
cd boost_1_72_0
./bootstrap.sh --prefix=/usr
./b2 -q
./b2 install -q
cd

编译libtorrent

git clone https://github.com/arvidn/libtorrent.git
cd libtorrent/
./autotool.sh
./configure --prefix=/usr CXXFLAGS=-std=c++14 
make
make install
ln -s /usr/lib/pkgconfig/libtorrent-rasterbar.pc /usr/lib64/pkgconfig/libtorrent-rasterbar.pc
ln -s /usr/lib/libtorrent-rasterbar.so.10 /usr/lib64/libtorrent-rasterbar.so.10
cd 

编译qbittorent

wget https://github.com/qbittorrent/qBittorrent/releases/tag/release-4.2.3
tar xf release-4.2.3.tar.gz
cd qBittorrent-release-4.2.3/
./configure --prefix=/usr --disable-gui CXXFLAGS=-std=c++14
make
make install
cd

配置systemd

vim /etc/systemd/system/qbittorrent.service
[Unit]
Description=qBittorrent Daemon Service
After=network.target

[Service]
LimitNOFILE=512000
User=root
ExecStart=/usr/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox

[Install]
WantedBy=multi-user.target

然后访问 http://你的IP:8080 进行设置
初始用户名:admin
初始密码:adminadmin

如果开启了防火墙

#放行8080端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=8080/udp --permanent
firewall-cmd --reload

#或者直接关闭防火墙
systemctl stop firewalld
systemctl disable firewalld

参考资料

https://www.fingertc.com/archives/287/

分类: Linux

0 条评论

发表回复

Avatar placeholder

您的邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据