Guida: Installazione e configurazione di Rtorrent, Rutorrent, Nginx, Php-fpm su Debian

Guida: Installazione e configurazione di Rtorrent, Rutorrent, Nginx, Php-fpm su Debian 5.00/5 (100.00%) 1 vote

Innanzitutto installate i prerequisiti
[php]apt-get install nginx rtorrent screen php-fpm[/php]

Creiamo utente con cui verrà eseguito rtorrent.
[php]
useradd -m rtorrent
cd /home/rtorrent
[/php]

Scaricate e modificate il file di configurazione di rtorrent

[php]
wget http://libtorrent.rakshasa.no/export/1303/trunk/rtorrent/doc/rtorrent.rc
mv rtorrent.rc .rtorrent.rc
vi .rtorrent.rc
[/php]

Aggiustate il file in base alle vostre preferenze, riporto qui solo alcune impostazioni essenziali:
[php]
# Default directory to save the downloaded torrents.
directory = ~/downloads

# Default session directory. Make sure you don’t run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = ~/session

# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=~/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=

scgi_port = localhost:5000
[/php]

Creiamo le cartelle specificate per il download dei file
[php]
mkdir /home/rtorrent/downloads
mkdir /home/rtorrent/session
mkdir /home/rtorrent/watch
[/php]

Sistemiamo i permessi
[php]
cd /home/rtorrent/
chown -R rtorrent.rtorrent *
[/php]

Creiamo (se serve) la cartella /var/www/
[php]
mkdir /var/www/
cd /var/www/
[/php]

Scarichiamo ultima versione di rutorrent e plugin
[php]
wget https://rutorrent.googlecode.com/files/rutorrent-3.5.tar.gz
wget https://rutorrent.googlecode.com/files/plugins-3.5.tar.gz
tar xzvf rutorrent-3.5.tar.gz
rm rutorrent-3.5.tar.gz
tar xzvf plugins-3.5.tar.gz
rm plugins-3.5.tar.gz
mv plugins rutorrent/plugins/
[/php]

creiamo il sito virtuale per rutorrent
[php]vi /etc/nginx/sites-available/rutorrent[/php]

[php]
#
server {
listen 80;
server_name rt.xxx.org;

root /var/www/rutorrent;
index index.php index.html index.htm;

location /RPC2 {
include /etc/nginx/scgi_params;
scgi_pass localhost:5000;
}

location / {
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
location ~ /\.ht {
deny all;
}
}
[/php]

abilitiamo il sito
[php]ln -s /etc/nginx/sites-available/rutorrent /etc/nginx/sites-enabled/rutorrent
/etc/init.d/nginx restart[/php]

You may also like...

Lascia un Commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">