Raspberry Pi 2B Step by Step Guide
Total Page:16
File Type:pdf, Size:1020Kb
Raspberry Pi 2b Step by step guide PART 2 Table of Contents 7. Torrent software (0:05) ........................................................................................................................................................................................... 2 Installing the qBittorrent server ................................................................................................................................................................................ 2 Increase download speeds by port forwarding qBittorrent .................................................................................................................. 4 Configuring a blocklist for qBittorrent ................................................................................................................................................................. 6 Creating a startup script for qBittorrent ............................................................................................................................................................. 7 Downloading a torrent file ........................................................................................................................................................................................ 9 Adding torrents automatically to the qBittorent WebUI (Chrome) ................................................................................................. 10 External access to the qBittorrent WebUI by port forwarding ............................................................................................................ 12 Moving partially downloaded torrents to a new server ........................................................................................................................ 14 Setting up access to qBittorrent on your android phone ..................................................................................................................... 15 Script to start & stop qbittorrent service .......................................................................................................................................................... 16 Restarting the qbittorrent service automatically with cron ................................................................................................................. 17 How to uninstall qBittorrent ..................................................................................................................................................................................... 18 8. Installing Apache web server (10:50) .......................................................................................................................................................... 19 Allowing the internet access to your Apache web server ................................................................................................................... 20 9. Installing MySQL database server, client and utilities (13:07) ........................................................................................................ 22 Installing MySQL server on the Raspberry Pi 2b ........................................................................................................................................... 22 Installing MySQL client on the Raspberry Pi 2b ............................................................................................................................................ 22 Install MySQL Workbench on the Raspberry Pi 2b ..................................................................................................................................... 23 Install MySQL Workbench on a windows desktop PC ............................................................................................................................. 25 Connecting MySQL Workbench to the Raspberry Pi 2b ....................................................................................................................... 26 Installing PhpMyAdmin on the Raspberry Pi 2b .......................................................................................................................................... 27 10. Installing Firefox (iceweasel) (17:00) ....................................................................................................................................................... 30 Video DownloadHelper addon ........................................................................................................................................................................... 30 11. Using SFTP to transfer files (WinSCP) (17:27) ........................................................................................................................................ 31 12. Using Dropbox (18:16) ..................................................................................................................................................................................... 32 MDTV3 PAGE 1 OF 35 Raspberry Pi 2b 7. Torrent software (0:05) Installing the qBittorrent server http://www.htpcbeginner.com/install-qbittorrent-webui-ubuntu/ Downloading of software & media via torrent can have legitimate purposes as well as non-legitimate. For example, NOOBS is available as a torrent download. Before we go too much further update & upgrade our system again by typing in the following command; sudo apt-get update && sudo apt-get upgrade Download and install qBittorrent NO X server version, Web UI (User Interface) by typing in the following: sudo apt-get install qbittorrent-nox To install the qBittorrent GUI (Graphical User Interface) version type: sudo apt-get install qbittorrent qbittorrent-nox Start the GUI version of qBittorrent by selecting it from the menu (or type qbittorrent-nox into a terminal) Click I agree From the Tools menu select options MDTV3 VERSION 1 PAGE 2 OF 35 Raspberry Pi 2b Select Downloads on the left hand side. Set the directory to save files to (and if preferred the location for incomplete torrents). Select Web UI on the left hand side. Place a tick in Enable web user interface, set the port to 8888 tick UPnP and HTTPS, set the username & password and tick to bypass for localhost. I’ve set the username to qtorrent and the password to secret Test that the web interface works by typing in the address to the server: 192.168.1.68:8888 Test from the Raspberry Pi 2B as well as another computer on your network. MDTV3 VERSION 1 PAGE 3 OF 35 Raspberry Pi 2b Increase download speeds by port forwarding qBittorrent To enable better download speed, we should port forward all qBittorrent traffic from your internet router to the Raspberry Pi 2b. From qBittorrent options page click on connection and see what port number qBittorrent is using (6881). On my router I go to Toolbox, Game & Application sharing and select create a new game or application. Type in an obvious name for the application, I chose to call it qBittorrent, click Manual entry of port maps, then clicked Next. Put the port number (6881) in the port range boxes and the translate to box and click add. MDTV3 VERSION 1 PAGE 4 OF 35 Raspberry Pi 2b Click on Assign a game or application to a local network device. Select the application name we created before, qBittorrent and then select the raspberrypi as the device and click add Use an online port checking program Test the connection http://www.yougetsignal.com/tools/open-ports/ If the test states that the port is open all is well, I have blocked out my real network address for privacy. MDTV3 VERSION 1 PAGE 5 OF 35 Raspberry Pi 2b Configuring a blocklist for qBittorrent Open the terminal and make sure you are at your home directory, type in cd Download a blocklist from where ever you like, I’m downloading this from bitsurge, type: sudo wget http://john.bitsurge.net/public/biglist.p2p.gz Unzip the blocklist by typing sudo gzip -d biglist.p2p.gz From qBittornet options click on Connections on the left and tick IP Filtering, click the icon with 3 dots to browse to the blocklist file. Click the icon with the green rotating arrow to load the blocklist Click OK https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/ MDTV3 VERSION 1 PAGE 6 OF 35 Raspberry Pi 2b Creating a startup script for qBittorrent Create a file by typing; sudo nano /etc/init.d/qbittorrent-nox-daemon Copy the contents of this script into it; http://www.htpcbeginner.com/resources/codes/qbittorrent-startup-script.txt Change DAEMON_ARGS="--webui-port=XXXX" to the port number to which you want qBittorrent to listen and Change USER=MyUserName to the name of the user whom you want to run qBittorrent daemon as. #! /bin/sh ### BEGIN INIT INFO # Provides: qbittorrent-nox # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts QBittorrent # Description: Start qbittorrent-nox on start. Change USER= before running ### END INIT INFO # Author: Jesper Smith # # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="QBittorrent" NAME=qbittorrent-nox DAEMON=/usr/bin/$NAME DAEMON_ARGS="--webui-port=8888" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/qbittorrent USER=pi # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend