Rtorrent and rutorrent on Debian with NGINX

From banana_wiki
Jump to: navigation, search
  • This was last ran and tested 11/2013

Install dependencies

apt-get install build-essential subversion automake libtool libcppunit-dev libcurl4-openssl-dev libsigc++-2.0-dev unzip unrar-free curl libncurses-dev tmux  

apt-get install nginx php5-fpm php5-cli mediainfo ffmpeg
mkdir rtorrent-install && cd rtorrent-install

Install xmlrpc

svn checkout http://svn.code.sf.net/p/xmlrpc-c/code/stable xmlrpc-c
cd xmlrpc-c
./configure --disable-cplusplus
make install

Install libtorrent

cd ..
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.3.tar.gz
tar xvf libtorrent*
cd libtorrent*
make install

Install rtorrent

cd ..
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.3.tar.gz
tar xvf rtorrent*
cd rtorrent*
./configure --with-xmlrpc-c
make install

make some folders

mkdir ~/rtorrent
mkdir ~/rtorrent/.session
mkdir ~/rtorrent/watch
mkdir ~/rtorrent/download

rtorrent config

wget http://bananafish.in/files/rtorrent.rc
mv rtorrent.rc .rtorrent.rc


wget http://dl.bintray.com/novik65/generic/rutorrent-3.6.tar.gz
tar zxvf rutorrent.*
mkdir /var/www
mv rutorrent /var/www
wget http://dl.bintray.com/novik65/generic/plugins-3.6.tar.gz
tar xvf plugins*
mv plugins /var/www/rutorrent/
chown -R www-data:www-data /var/www

setup php5-fpm

edit /etc/php5/fpm/pool.d/www.conf so you change: listen = /var/run/php5-fpm.sock to listen = 9000

Then restart the daemon: /etc/init.d/php5-fpm restart

secure rutorrent

openssl req $@ -new -x509 -days 365 -nodes -out /etc/nginx/ssl/nginx.pem -keyout /etc/nginx/ssl/nginx.pem
printf "seeder1:$(openssl passwd -1 YOUR_PASS_HERE)\n" >> /etc/nginx/passwords

setup the rutorrent webpage

cd /etc/nginx/sites-available
wget http://bananafish.in/files/rutorrent-nginx
ln -s /etc/nginx/sites-available/rutorrent /etc/nginx/sites-enabled/
/etc/init.d/nginx restart

Now Run rtorrent

C-b, C-d