Skip to content

Instantly share code, notes, and snippets.

@1gg
Last active January 17, 2020 15:18
Show Gist options
  • Save 1gg/2d9977c523950b3e43452e59328c12ff to your computer and use it in GitHub Desktop.
Save 1gg/2d9977c523950b3e43452e59328c12ff to your computer and use it in GitHub Desktop.
非一键
#Required dependencies
#General required dependencies
sudo apt-get install libboost-dev libboost-system-dev build-essential
sudo apt-get install libboost-system-dev libboost-chrono-dev libboost-random-dev libssl-dev libgeoip-dev
sudo apt-get install git pkg-config automake libtool
#Qt5 libraries
sudo apt-get install qtbase5-dev qttools5-dev-tools
#Python (Run time only dependency, for the search engine)
sudo apt-get install python
#Optional Geoip Database (For peer country resolution, strongly advised)
sudo apt-get install geoip-database
#all-in-one
sudo apt-get -y install libboost-dev libboost-system-dev build-essential libqt4-dev qtbase5-dev qttools5-dev-tools python libboost-system-dev libboost-chrono-dev libboost-random-dev libssl-dev libgeoip-dev git pkg-config automake libtool
#Libtorrent
#Clone
sudo git clone https://github.com/arvidn/libtorrent.git
cd libtorrent
#use libtorrent 1.0.*. (recommended)
git checkout RC_1_0
sudo ./autotool.sh
sudo ./configure --disable-debug --enable-encryption --prefix=/usr --with-libgeoip=system
#compile libtorrent, -j4 using 4 threads in the same time
sudo make clean && sudo make -j4
sudo make install
#clone qb from git
cd ..
sudo git clone -b release-3.3.11 https://github.com/qbittorrent/qBittorrent.git
cd qBittorrent
#Compiling qBittorrent-nox
sudo ./configure --prefix=/usr --disable-gui
sudo make -j4
#install qb
sudo make install
#create systemd for qb to run on start-up https://github.com/qbittorrent/qBittorrent/wiki/Setting-up-qBittorrent-on-Ubuntu-server-as-daemon-with-Web-interface-(15.04-and-newer)
sudo nano /etc/systemd/system/qbittorrent.service
#paste in
[Unit]
Description=qBittorrent Daemon Service
Documentation=man:qbittorrent-nox(1)
Wants=network-online.target
After=network-online.target nss-lookup.target
[Service]
# if you have systemd >= 240, you probably want to use Type=exec instead
Type=simple
User=qbtuser
ExecStart=/usr/bin/qbittorrent-nox
TimeoutStopSec=infinity
[Install]
WantedBy=multi-user.target
#Initializing Configuration
#And run qbittorrent:
qbittorrent-nox
#Press y key and you should see******** Information ********
#To control qBittorrent, access the Web UI at http://localhost:8080
#The Web UI administrator user name is: admin
#The Web UI administrator password is still the default one: adminadmin
#Enable service:
sudo systemctl start qbittorrent
#Verify it is running:
sudo systemctl status qbittorrent
#Quit out of the above screen by pressing q
#Enable it to start up on boot:
sudo systemctl enable qbittorrent
#Starting qBittorrent
sudo systemctl start qbittorrent
#Stopping qBittorrent:
sudo systemctl stop qbittorrent
#Check status:
sudo systemctl status qbittorrent
#check log
sudo journalctl -u qbittorrent.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment