首页 vps [ 编辑 ]

搭建qbittorrent-nox-static


安装qBittorrent简介
1.基于开源项目 qbittorrent-nox-static ,适用于CentOS | Fedora | OpenSuse | Debian Stretch | Ubuntu Xenial 等等
2.搭建环境
系统:Debian 10 x86_64

安装
1.在releases页面,获取适合自己系统的包:

xxxx-qbttorrent-nox中的xxxx,为不同的系统名称,具体可以使用uname -m命令查看

# 下载qbittorrent-nox二进制文件,并放到/usr/local/bin目录下面
wget -qO /usr/local/bin/qbittorrent-nox https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-4.5.4_v1.2.19/$(uname -m)-qbittorrent-nox
# 二进制文件700权限
chmod 700 /usr/local/bin/qbittorrent-nox

2.编写守护进程systemctl
编辑文件

nano /etc/systemd/system/qbt.service

并添加以下内容

[Unit]
Description=qBittorrent Service
After=network.target nss-lookup.target

[Service]
UMask=000
ExecStart=/usr/local/bin/qbittorrent-nox --profile=/usr/local/etc\
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

3.systemcctl 守护进程命令

systemctl enable qbt   #开机启动,第一次必须要执行此命令
systemctl start qbt  #启动
systemctl stop qbt  #停止
systemctl status qbt  #软件运行状态查询

4.nginx反向代理(默认是监听8080端口)

location / {
proxy_pass    http://127.0.0.1:8080/;
proxy_http_version      1.1;
proxy_set_header     X-Forwarded-Host  $http_host;
http2_push_preload on;
}

5.web访问
执行命令systemctl start qbt启动qbt服务,然后通过ip:8080即可访问,默认用户名为admin,登录密码为adminadmin

卸载

# 先停止qbt服务
systemctl stop qbt
# 删除守护进程文件
rm /etc/systemd/system/qbt.service
# 删除qbt二进制文件
rm /usr/local/bin/x86_64-qbittorrent-nox
# 删除下载的文件与临时文件,默认存储位置为 /usr/local/etc/qBittorrent/
rm -r /usr/local/etc/qBittorrent/


文章评论