Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Part 1 – Install rTorrent + NginX + ruTorrent
- June 11, 2014/0 Comments/in Debian, Linux, Seedbox /by G33K
- *System Update
- --------------
- apt-get update
- apt-get upgrade
- *Check if Apache installed by Default
- dpkg -s apache
- If apache is not installed it will show something like this :
- --------------
- dpkg-query: package 'apache' is not installed and no information is available
- Use dpkg --info (= dpkg-deb --info) to examine archive files,
- and dpkg --contents (= dpkg-deb --contents) to list their contents.
- If installed, delete it by this command
- --------------
- service apache2 stop
- apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
- apt-get remove apache2
- apt-get autoremove
- ========================
- *Install sudo
- --------------
- apt-get install sudo
- *Install Build Essential
- --------------
- sudo apt-get install build-essential subversion automake libtool libcppunit-dev libcurl3-dev libsigc++-2.0-dev libcppunit-dev curl libncurses-dev
- *Install NginX
- --------------
- sudo apt-get install nginx-full
- *Install nano
- --------------
- sudo apt-get install nano
- *Install Screen
- --------------
- sudo apt-get install screen
- *Install Zip/Unzip/Unrar/7-Zip
- --------------
- sudo apt-get install unzip unrar-free p7zip-full
- *Install MediaInfo
- --------------
- sudo apt-get install mediainfo
- *Install php
- --------------
- sudo apt-get install php5-fpm php5-cli php5-geoip php5 php5-curl php-xml-rss php5-xmlrpc php5-sqlite sqlite
- * Install GeoIP
- --------------
- sudo wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
- sudo gunzip GeoLiteCity.dat.gz
- sudo mkdir -v /usr/share/GeoIP
- sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat
- ========================
- * Install XMLRPC.
- --------------
- sudo mkdir install
- cd install
- sudo svn checkout http://svn.code.sf.net/p/xmlrpc-c/code/stable xmlrpc-c
- cd xmlrpc-c
- sudo ./configure --disable-cplusplus
- sudo make
- sudo make install
- * Install rTorrent.
- Install libtorrent
- --------------
- cd ..
- sudo wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.4.tar.gz
- sudo tar xvf libtorrent-0.13.4.tar.gz
- cd libtorrent-0.13.4
- sudo ./autogen.sh
- sudo ./configure
- sudo make
- sudo make install
- Install rTorrent
- --------------
- cd ..
- sudo wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.4.tar.gz
- sudo tar xvf rtorrent-0.9.4.tar.gz
- cd rtorrent-0.9.4
- sudo ./autogen.sh
- sudo ./configure --with-xmlrpc-c
- sudo make
- sudo make install
- sudo ldconfig
- ========================
- *Create Directories
- --------------
- mkdir -p ~/rtorrent/{.session,watch,download}
- *Edit rTorrent Config File
- --------------
- nano ~/.rtorrent.rc
- directory = /var/www/download
- session = /var/www/session
- #schedule = watch_directory,5,5,load_start=/home/username/rtorrent/watch/*.torrent
- port_range = 6882-6892
- upload_rate = 0
- download_rate = 0
- use_udp_trackers = yes
- max_uploads = 200
- min_peers=10
- max_peers=400
- check_hash = no
- # DHT
- peer_exchange = yes
- dht_port = 1026
- dht = auto
- # Encryption
- encryption = allow_incoming,try_outgoing,require,require_RC4,prefer_plaintext,enable_retry
- # SCGI
- scgi_port = localhost:5000
- *Change Permission for rTorrent Config File
- sudo chmod 777 /root/.rtorrent.rc
- *Create Download Directory
- --------------
- sudo mkdir /var/www
- sudo mkdir /var/www/session
- sudo mkdir /var/www/rutorrent
- sudo mkdir /var/www/download
- sudo chown www-data:www-data /var/www
- sudo chown www-data:www-data /var/www/session
- sudo chown www-data:www-data /var/www/rutorrent
- sudo chown www-data:www-data /var/www/download
- *Download ruTorrent & Plugins
- --------------
- cd
- wget http://dl.bintray.com/novik65/generic/rutorrent-3.6.tar.gz
- wget http://dl.bintray.com/novik65/generic/plugins-3.6.tar.gz
- *Unzip ruTorrent & Plugins to /var/www & Change Permission
- --------------
- sudo tar xvf rutorrent-3.6.tar.gz -C /var/www
- sudo tar xvf plugins-3.6.tar.gz -C /var/www/rutorrent
- sudo chown www-data:www-data -R /var/www/rutorrent
- *Configure ruTorrent
- --------------
- sudo nano /var/www/rutorrent/conf/config.php
- $pathToExternals = array(
- "php" => '/usr/bin/php', // Something like /usr/bin/php. If empty, will be found in PATH.
- "curl" => '/usr/bin/curl', // Something like /usr/bin/curl. If empty, will be found in PATH.
- "gzip" => '/usr/bin/gzip', // Something like /usr/bin/gzip. If empty, will be found in PATH.
- "id" => '/usr/bin/id', // Something like /usr/bin/id. If empty, will be found in PATH.
- "stat" => '/usr/bin/stat', // Something like /usr/bin/stat. If empty, will be found in PATH.
- );
- * Start rTorrent via Screen
- --------------
- screen -fa -d -m rtorrent
- * Testing rTorrent
- --------------
- sudo netstat -npl | grep rtorrent
- *Configure NginX for ruTorrent
- --------------
- nano /etc/nginx/sites-available/default
- server {
- root /var/www;
- index index.html index.php index.htm;
- server_name localhost;
- location / {
- autoindex on;
- try_files $uri $uri/ /index.html;
- }
- location /var/www/download {
- autoindex on;
- }
- location /RPC2 {
- include scgi_params;
- scgi_pass 127.0.0.1:5000;
- }
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- #
- # # With php5-cgi alone:
- # fastcgi_pass 127.0.0.1:9000;
- # # With php5-fpm:
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- }
- * Install Apache Utilities
- --------------
- sudo apt-get install apache2-utils
- * Create User Name & Password for ruTorrent Directory Access
- --------------
- sudo htpasswd -c /var/www/rutorrent/.htpasswd root
- * Add this in NginX Server Block
- location /rutorrent {
- auth_basic "Restricted";;
- auth_basic_user_file /var/www/rutorrent/.htpasswd;
- }
- * Restart Nginx and PHP
- --------------
- sudo service nginx restart
- sudo service php5-fpm restart
- * Complie and Install ffmpeg
- sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev
- mkdir ~/ffmpeg_sources
- cd ~/ffmpeg_sources
- wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
- tar xjvf ffmpeg-snapshot.tar.bz2
- cd ffmpeg
- ./configure
- make
- make install
- make distclean
- hash -r
- ruTorrent can be accessed by browsing to http://ip_address/rutorrent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement