安装add-apt-repository命令
1 |
apt-get install software-properties-common |
添加PPA源
1 2 3 4 5 6 7 |
# qBittorrent 稳定版 sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable # qBittorrent 测试版 sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-unstable |
Install
qBittorrent-nox is already included in the official Ubuntu repositories. Install with:
1 |
sudo apt-get update && sudo apt-get install qbittorrent-nox |
Create Service
First, create a file:
1 |
vi /etc/systemd/system/qbittorrent.service |
1 2 3 4 5 6 7 8 9 10 11 |
[Unit] Description=qBittorrent Daemon Service After=network.target [Service] User=ptb ExecStart=/usr/bin/qbittorrent-nox ExecStop=/usr/bin/killall -w qbittorrent-nox [Install] WantedBy=multi-user.target |
1 |
sudo systemctl daemon-reload |
Enable service:
Now start the service,
1 |
sudo systemctl start qbittorrent |
Verify it is running:
1 |
sudo systemctl status qbittorrent |
Enable it to start up on boot:
1 |
sudo systemctl enable qbittorrent |