Note:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Package:Rutorrent"

From Funtoo
Jump to navigation Jump to search
m (ill clean this up with real syntax after a smoke.)
m (fix link to rtorrent configuration setting)
 
(11 intermediate revisions by 2 users not shown)
Line 8: Line 8:
{{console|body=###i## emerge www-apps/rutorrent}}
{{console|body=###i## emerge www-apps/rutorrent}}


===configuration===
===Prerequisites===
were going to configure nginx to serve this.
*Install your web server {{package|www-servers/nginx}}, and get {{package|dev-lang/php}} with the fpm use flag running first.  nginx needs to be built with nginx_modules_http_scgi
*you must turn on scgi_pass in the [[Package:Rtorrent#xml_rpc | rtorrent]] config.
*you must be running rtorrent, or rtorrentd.


first figure out what php you're using
===Configuration===
==== nginx config====
{{file|name=/etc/nginx/sites-available/localhost|lang=|desc=nginx configuration|body=
server {
listen 127.0.0.1:80;
server_name localhost;
access_log /var/log/nginx/localhost.access_log main;
error_log /var/log/nginx/localhost.error_log info;
root /var/www/localhost/htdocs;
index index.php index.cgi index.htm index.html;
autoindex on;


{{console|body=###i##eselect php list fpm
        location ~ \.php$ {
[1]  php5.5 *
                fastcgi_pass 127.0.0.1:9000;
###i## eselect php list cgi
include fastcgi.conf;
[1]  php5.5 *
                #fastcgi_pass unix:/var/run/php5-fpm.sock;
###i## eselect php list apache2
        }
[1]  php5.5 *
 
###i## eselect php list cli
          location /rutorrent {
[1]  php5.5 *
              include scgi_params;
              scgi_pass localhost:5000;
          }
}
}}
}}


following https://wiki.archlinux.org/index.php/RuTorrent#Nginx
Restart nginx:
{{console|body=###i## /etc/init.d/nginx restart}}
 
Point your browser to


Edit the open_basedir value in /etc/php/php.ini to include: only our php ini is located elsewhere.
http://127.0.0.1/rutorrent
/etc/php/fpm-php5.5/php.ini


/etc/webapps/rutorrent/conf/:/usr/share/webapps/rutorrent/php/:/usr/share/webapps/rutorrent/
or


ours is located in /var/www/localhost/htdocs/rutorrent
http://localhost/rutorrent


===Troubleshooting===


          location /RPC2 {
====Errors====
              include scgi_params;
If you are able to open the rutorrent web interface but receive errors such as '''Bad response from server: (502 [error,getplugins])''' then edit and change/uncomment the following:  
              scgi_pass localhost:5000;
          }


instead for us
{{file|name=/etc/php/fpm-php5.5/php-fpm.conf |lang=|desc=|body=
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
}}


file:
The just restart php-fpm:  
/etc/nginx/sites-available/localhost


server {
{{console|body=###i## /etc/init.d/php-fpm restart}}
listen 127.0.0.1:80;
server_name localhost;


          location /rutorrent {
====Clock shows the incorrect time====
              include scgi_params;
              scgi_pass localhost:5000;
          }
}


If rutorrent's clock displays the incorrect time/timezone then it can be changed.


then start nginx
{{file|name=/etc/php/fpm-php5.5/php.ini |lang=|desc=|body=
{{console|body=###i## /etc/init.d/nginx restart}}
date.timezone = "Europe/Athens"
}}


point browser to
A full list of supported timezones can be found at http://php.net/manual/en/timezones.php


127.0.0.1/rutorrent
==== 502 ====
502 Bad Gateway is caused by nginx being started and php-fpm not being started.


if anything is missing its turning on the scgi_pass within rtorrents configuration file.


{{PageNeedsUpdates}}
{{PageNeedsUpdates}}
{{EbuildFooter}}
{{EbuildFooter}}

Latest revision as of 21:42, March 10, 2015

Rutorrent

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

rutorrent is a front end to net-p2p/rtorrent and is designed to look like utorrent =D

root # emerge www-apps/rutorrent

Prerequisites

  • Install your web server www-servers/nginx, and get dev-lang/php with the fpm use flag running first. nginx needs to be built with nginx_modules_http_scgi
  • you must turn on scgi_pass in the rtorrent config.
  • you must be running rtorrent, or rtorrentd.

Configuration

nginx config

   /etc/nginx/sites-available/localhost - nginx configuration
server {
	listen 127.0.0.1:80;
	server_name localhost;
	access_log /var/log/nginx/localhost.access_log main;
	error_log /var/log/nginx/localhost.error_log info;
	root /var/www/localhost/htdocs;
	index index.php index.cgi index.htm index.html;
	autoindex on;

        location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9000;
		include fastcgi.conf;
                #fastcgi_pass unix:/var/run/php5-fpm.sock;
        }

           location /rutorrent {
               include scgi_params;
               scgi_pass localhost:5000;
           }
}

Restart nginx:

root # /etc/init.d/nginx restart

Point your browser to

http://127.0.0.1/rutorrent

or

http://localhost/rutorrent

Troubleshooting

Errors

If you are able to open the rutorrent web interface but receive errors such as Bad response from server: (502 [error,getplugins]) then edit and change/uncomment the following:

   /etc/php/fpm-php5.5/php-fpm.conf
listen.owner = www-data
listen.group = www-data
listen.mode = 0666

The just restart php-fpm:

root # /etc/init.d/php-fpm restart

Clock shows the incorrect time

If rutorrent's clock displays the incorrect time/timezone then it can be changed.

   /etc/php/fpm-php5.5/php.ini
date.timezone = "Europe/Athens"

A full list of supported timezones can be found at http://php.net/manual/en/timezones.php

502

502 Bad Gateway is caused by nginx being started and php-fpm not being started.