Difference between revisions of "RuTorrent"

From ArchWiki
Jump to: navigation, search
(Apache)
m (semi-automatic style fixes, see Help:Style)
 
(29 intermediate revisions by 17 users not shown)
Line 1: Line 1:
[[Category:Internet Applications]]
+
[[Category:Internet applications]]
{{Article summary start}}
+
[[ja:RuTorrent]]
{{Article summary text|This article covers the installation of ruTorrent and configuring with Apache.}}
+
[[ru:RuTorrent]]
{{Article summary end}}
+
{{Merge|Rutorrent with lighttpd|Same topic.|Talk:Rutorrent with lighttpd#Merge}}
  
'''[http://code.google.com/p/rutorrent/ ruTorrent]''' is a web interface to rtorrent (a console based BitTorrent client). It uses rtorrent's build-in xmlrpc server to communicate with it.
+
'''[https://github.com/Novik/ruTorrent ruTorrent]''' is a web interface to [[rTorrent]] (a console based BitTorrent client). It uses rTorrent's built-in XML-RPC server to communicate with it.
  
 
It is lightweight, highly extensible, and is designed to look similar to uTorrent.
 
It is lightweight, highly extensible, and is designed to look similar to uTorrent.
 
  
 
== Installation ==
 
== Installation ==
Install {{AUR|rutorrent}} and optionally {{AUR|rutorrent-plugins}} from the AUR.
+
Install {{AUR|rutorrent}} from the AUR. If you want to use the development version install {{AUR|rutorrent-git}}.
  
 
== Web Server Configuration ==
 
== Web Server Configuration ==
Line 25: Line 24:
 
  LoadModule scgi_module modules/mod_scgi.so
 
  LoadModule scgi_module modules/mod_scgi.so
  
* Enable the rTorrent XMLRPC interface: [[rTorrent#XMLRPC_interface]]
+
* Enable the rTorrent XMLRPC interface: [[rTorrent#XMLRPC interface]]
  
 
* Enable SCGI on the port you chose for rTorrent by adding this to {{ic|/etc/httpd/conf/httpd.conf}}:
 
* Enable SCGI on the port you chose for rTorrent by adding this to {{ic|/etc/httpd/conf/httpd.conf}}:
 
  SCGIMount /RPC2 127.0.0.1:5000
 
  SCGIMount /RPC2 127.0.0.1:5000
  
* Lastly, add the ruTorrent folder to {{ic|/etc/httpd/conf/httpd.conf}} with something similar to this:
+
* Lastly, add the ruTorrent folder to {{ic|/etc/httpd/conf/httpd.conf}} with something similar to this anywhere after the inital ''</Directory>'':
 
  <IfModule alias_module>
 
  <IfModule alias_module>
 
   Alias /rutorrent /usr/share/webapps/rutorrent
 
   Alias /rutorrent /usr/share/webapps/rutorrent
Line 36: Line 35:
 
     Order allow,deny
 
     Order allow,deny
 
     Allow from all
 
     Allow from all
 +
  </Directory>
 +
</IfModule>
 +
 +
For Apache 2.4 the access control would be:
 +
<IfModule alias_module>
 +
  Alias /rutorrent /usr/share/webapps/rutorrent
 +
  <Directory "/usr/share/webapps/rutorrent">
 +
    Require all granted
 
   </Directory>
 
   </Directory>
 
  </IfModule>
 
  </IfModule>
  
 
{{Note|You should enable authentication through Apache if your site is public.}}
 
{{Note|You should enable authentication through Apache if your site is public.}}
 +
 +
=== Nginx ===
 +
 +
* Create a link from your web root to rutorrent
 +
ln -s /usr/share/webapps/rutorrent/ /usr/share/nginx/html/rutorrent
 +
 +
* Edit the ''open_basedir'' value in /etc/php/php.ini to include:
 +
/etc/webapps/rutorrent/conf/:/usr/share/webapps/rutorrent/php/:/usr/share/webapps/rutorrent/
 +
 +
* Enable the rTorrent XMLRPC interface: [[rTorrent#XMLRPC interface]]
 +
 +
* Add following location to your nginx configuration:
 +
            location /RPC2 {
 +
                include scgi_params;
 +
                scgi_pass localhost:5000;
 +
            }
 +
 +
* Restart nginx:
 +
# systemctl restart nginx
 +
 +
* You can now access ruTorrent at http://127.0.0.1/rutorrent
 +
 +
=== Nginx (manual installation) ===
 +
* Install nginx, php-fpm, rtorrent
 +
 +
* Download and unpack [https://github.com/Novik/ruTorrent rutorrent]:
 +
 +
{{hc|tree -L 2 /usr/share/nginx/html/|
 +
/usr/share/nginx/html/
 +
├── 50x.html
 +
├── index.html
 +
└── rutorrent
 +
    ├── conf
 +
    ├── css
 +
    ├── images
 +
    ├── index.html
 +
    ├── js
 +
    ├── lang
 +
    ├── LICENSE.md
 +
    ├── php
 +
    ├── plugins
 +
    ├── README.md
 +
    └── share
 +
}}
 +
 +
* Modify premissions:
 +
sudo chmod 0777 /usr/share/nginx/html/rutorrent/share/{settings,torrents,users}
 +
 +
* Make necessary changes to rtorrent and nginx:
 +
 +
{{hc|~/.rtorrent.rc|<nowiki>
 +
...
 +
scgi_port = localhost:5000
 +
</nowiki>}}
 +
{{hc|/etc/nginx/nginx.conf|<nowiki>
 +
worker_processes  1;
 +
events {
 +
    worker_connections  1024;
 +
}
 +
http {
 +
    include      mime.types;
 +
    default_type  application/octet-stream;
 +
    sendfile        on;
 +
    keepalive_timeout  65;
 +
    server {
 +
        listen      80;
 +
        server_name  localhost;
 +
        root /usr/share/nginx/html;
 +
        location / {
 +
            index  index.html index.htm;
 +
        }
 +
        location ~ \.php$ {
 +
            fastcgi_pass  unix:/run/php-fpm/php-fpm.sock;
 +
            fastcgi_index  index.php;
 +
            include        fastcgi.conf;
 +
        }
 +
        location /RPC2 {
 +
            include scgi_params;
 +
            scgi_pass localhost:5000;
 +
        }
 +
        error_page  500 502 503 504  /50x.html;
 +
        location = /50x.html {
 +
            root  /usr/share/nginx/html;
 +
        }
 +
    }
 +
}
 +
</nowiki>}}
 +
{{Note|''open_basedir'' is unset by default and does not have to be changed.}}
 +
* Start necessary services:
 +
sudo systemctl start php-fpm nginx
 +
* Consider using [[RTorrent#systemd_service_file_with_tmux_or_screen|rtorrent with tmux]]
 +
* Navigate to [http://localhost/rutorrent/ http://localhost/rutorrent/]
  
 
== ruTorrent Configuration ==
 
== ruTorrent Configuration ==
 +
See upstream wiki [https://github.com/Novik/ruTorrent/wiki/Config here]. By default the configuration files are symlinked to  {{ic|/etc/webapps/rutorrent/conf}}.
  
 
== See Also ==
 
== See Also ==
[[LAMP]]
+
* [[LAMP]]
 
+
* [[RTorrent]]
[[rtorrent]]
+
  
== External Links ==  
+
== External Links ==
* http://code.google.com/p/rutorrent/wiki/TableOfContents?tm=6
+
* https://github.com/Novik/ruTorrent/wiki
 
* http://httpd.apache.org/docs/2.2/configuring.html
 
* http://httpd.apache.org/docs/2.2/configuring.html

Latest revision as of 09:33, 27 September 2016

Merge-arrows-2.pngThis article or section is a candidate for merging with Rutorrent with lighttpd.Merge-arrows-2.png

Notes: Same topic. (Discuss in Talk:Rutorrent with lighttpd#Merge)

ruTorrent is a web interface to rTorrent (a console based BitTorrent client). It uses rTorrent's built-in XML-RPC server to communicate with it.

It is lightweight, highly extensible, and is designed to look similar to uTorrent.

Installation

Install rutorrentAUR from the AUR. If you want to use the development version install rutorrent-gitAUR.

Web Server Configuration

Apache

Install and configure Apache with PHP according to the LAMP page.

  • Edit the open_basedir value in /etc/php/php.ini to include:
/etc/webapps/rutorrent/conf/:/usr/share/webapps/rutorrent/php/:/usr/share/webapps/rutorrent/

Install mod_scgiAUR from the AUR.

  • Load the SCGI module in /etc/httpd/conf/httpd.conf:
LoadModule scgi_module modules/mod_scgi.so
  • Enable SCGI on the port you chose for rTorrent by adding this to /etc/httpd/conf/httpd.conf:
SCGIMount /RPC2 127.0.0.1:5000
  • Lastly, add the ruTorrent folder to /etc/httpd/conf/httpd.conf with something similar to this anywhere after the inital </Directory>:
<IfModule alias_module>
  Alias /rutorrent /usr/share/webapps/rutorrent
  <Directory "/usr/share/webapps/rutorrent">
    Order allow,deny
    Allow from all
  </Directory>
</IfModule>

For Apache 2.4 the access control would be:

<IfModule alias_module>
  Alias /rutorrent /usr/share/webapps/rutorrent
  <Directory "/usr/share/webapps/rutorrent">
    Require all granted
  </Directory>
</IfModule>
Note: You should enable authentication through Apache if your site is public.

Nginx

  • Create a link from your web root to rutorrent
ln -s /usr/share/webapps/rutorrent/ /usr/share/nginx/html/rutorrent
  • Edit the open_basedir value in /etc/php/php.ini to include:
/etc/webapps/rutorrent/conf/:/usr/share/webapps/rutorrent/php/:/usr/share/webapps/rutorrent/
  • Add following location to your nginx configuration:
           location /RPC2 {
               include scgi_params;
               scgi_pass localhost:5000;
           }
  • Restart nginx:
# systemctl restart nginx

Nginx (manual installation)

  • Install nginx, php-fpm, rtorrent
tree -L 2 /usr/share/nginx/html/
/usr/share/nginx/html/
├── 50x.html
├── index.html
└── rutorrent
    ├── conf
    ├── css
    ├── images
    ├── index.html
    ├── js
    ├── lang
    ├── LICENSE.md
    ├── php
    ├── plugins
    ├── README.md
    └── share
  • Modify premissions:
sudo chmod 0777 /usr/share/nginx/html/rutorrent/share/{settings,torrents,users}
  • Make necessary changes to rtorrent and nginx:
~/.rtorrent.rc
...
scgi_port = localhost:5000
/etc/nginx/nginx.conf
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
        root /usr/share/nginx/html;
        location / {
            index  index.html index.htm;
        }
        location ~ \.php$ {
            fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;
            fastcgi_index  index.php;
            include        fastcgi.conf;
        }
        location /RPC2 {
            include scgi_params;
            scgi_pass localhost:5000;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
    }
}
Note: open_basedir is unset by default and does not have to be changed.
  • Start necessary services:
sudo systemctl start php-fpm nginx

ruTorrent Configuration

See upstream wiki here. By default the configuration files are symlinked to /etc/webapps/rutorrent/conf.

See Also

External Links