Featured image of post linux快速安装qbittorrent

linux快速安装qbittorrent

通过获取静态的二进制文件来安装任意版本qbittorrent

前言

如果临时需要安装一个qbittorrent软件来下载,有什么方便快捷的方法呢?于是我发现了一个提供qbittorrent静态二进制文件的项目qbittorrent-nox-static

安装

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#下载4.4.5版本
wget -qO /usr/local/bin/qbittorrent-nox https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-4.4.5_v1.2.18/x86_64-qbittorrent-nox

#赋予执行权限
chmod 700 /usr/local/bin/qbittorrent-nox

#创建配置文件目录
mkdir -p ~/.config/qBittorrent

#创建配置文件
echo '[LegalNotice]
Accepted=true

[Preferences]
WebUI\Port=8080' > ~/.config/qBittorrent/qBittorrent.conf

#创建systemd服务文件
echo '[Unit]
Description=qBittorrent-nox service
Wants=network-online.target
After=network-online.target nss-lookup.target

[Service]
Type=exec
User=root
ExecStart=/usr/local/bin/qbittorrent-nox
Restart=on-failure
SyslogIdentifier=qbittorrent-nox

[Install]
WantedBy=multi-user.target' > /etc/systemd/system/qbittorrent.service

#重载systemd配置文件
systemctl daemon-reload

#启动并设置开机自启
systemctl enable --now qbittorrent.service

此时应该能正常通过8080端口访问webui
用户名:admin
密码:adminadmin

结语

利用这个项目能快速获取任意版本的qbittorrent静态二进制文件并安装,只需要无脑复制上面的命令运行即可。

其实我发现并使用这个项目有一段时间了,但我一直懒得写文章。

使用 Hugo 构建
主题 StackJimmy 设计