序言
yum -y install epel-release
yum -y groupinstall "Development Tools"
yum -y install wget git gcc gcc-c++ qt-devel boost-devel openssl-devel qt5-qtbase-devel qt5-linguist
wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_1_6/libtorrent-rasterbar-1.1.6.tar.gz
tar -zxf libtorrent-rasterbar-1.1.6.tar.gz
cd libtorrent-rasterbar-1.1.6
./configure --prefix=/usr CXXFLAGS=-std=c++11
make
make install
ln -s /usr/lib/pkgconfig/libtorrent-rasterbar.pc /usr/lib64/pkgconfig/libtorrent-rasterbar.pc
ln -s /usr/lib/libtorrent-rasterbar.so.9 /usr/lib64/libtorrent-rasterbar.so.9
cd ..
git clone https://github.com/qbittorrent/qBittorrent.git
cd qBittorrent
./configure --prefix=/usr --disable-gui CPPFLAGS=-I/usr/include/qt5 CXXFLAGS=-std=c++11
make
make install
systemctl stop firewalld.service
qbittorrent-nox #运行,第一次运行 按 y 同意
qbittorrent-nox -d 或 qbittorrent-nox & #后台运行
注册成服务
vi /usr/lib/systemd/system/qbittorrent.service
[Unit]
Description=qbittorrent torrent server
[Service]
User=root
ExecStart=/usr/bin/qbittorrent-nox
Restart=on-abort
[Install]
WantedBy=multi-user.target
systemctl daemon-reload #重载daemon生效
相关命令
systemctl start qbittorrent
systemctl enable qbittorrent #开启启动
systemctl status qbittorrent
systemctl stop qbittorrent
开启启动
chkconfig qbittorrent on
关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
转自 http://hh.tn/d/146
转自 https://lala.im/3024.html ,简化整理