Difference between pages "Package:PHP" and "Package:Rutorrent"

(Difference between pages)
m (add clock info and other stuff)
 
m (fix link to rtorrent configuration setting)
 
Line 1: Line 1:
 
{{Ebuild
 
{{Ebuild
|Summary=The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs
+
|Summary=ruTorrent is a front-end for the popular Bittorrent client rTorrent
|CatPkg=dev-lang/php
+
|CatPkg=www-apps/rutorrent
|Maintainer=
+
|Homepage=http://code.google.com/p/rutorrent/
|Homepage=http://php.net/
+
 
}}
 
}}
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language.
+
rutorrent is a front end to {{package|net-p2p/rtorrent}} and is designed to look like utorrent =D
  
== Install ==
+
{{console|body=###i## emerge www-apps/rutorrent}}
=== Use Flags ===
+
By default php does not have the cgi, FPM/FastCGI, mysql, mysqli, apache2 use flag turned on.  Many packages are php aware, set the php global use flag so other applications can interact with php.
+
  
{{file|name=/usr/portage/make.conf|desc=insert desired use flags|body=
+
===Prerequisites===
USE="php mysql mysqli apache2 fpm cgi......"
+
*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.
 +
 
 +
===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;
 +
 
 +
        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;
 +
          }
 +
}
 
}}
 
}}
  
=== Emerge ===
+
Restart nginx:
<console>###i## emerge php</console>
+
{{console|body=###i## /etc/init.d/nginx restart}}
  
== Fpm ==
+
Point your browser to
Fpm is a php handler.  It is php daemonized.
+
  
=== init ===
+
http://127.0.0.1/rutorrent
  
To start the php-fpm service:
+
or
<console>###i## rc-service php-fpm start</console>
+
  
To start the php-fpm service at boot:
+
http://localhost/rutorrent
<console>###i## rc-update add php-fpm</console>
+
  
=== Configuration ===
+
===Troubleshooting===
  
Php-fpm is controlled by <code>/etc/php/fpm-php*.*/php-fpm.conf</code> and <code>/etc/php/fpm-php*.*/php.ini</code>
+
====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:
  
==== tips ====
+
{{file|name=/etc/php/fpm-php5.5/php-fpm.conf |lang=|desc=|body=
==== Change Php Fpm's User/Group ====
+
listen.owner = www-data
Making php-fpm workers work as the apache user makes most apache permission configurations work with out a bother.
+
listen.group = www-data
{{file|name=/etc/php/fpm-php5.6/php-fpm.conf|lang=|desc=make workers run as another user|body=
+
listen.mode = 0666
;user = nobody
+
;group = nobody
+
user = apache
+
group = apache
+
 
}}
 
}}
  
==== Limiting Workers ====
+
The just restart php-fpm:
Limit worker numbers to 20 max.  When your server is behind a reverse proxy it doesn't need many workers.
+
{{file|name=/etc/php/fpm-php5.6/php-fpm.conf|lang=|desc=limit workers|body=
+
pm.max_children = 20
+
pm.start_servers = 1
+
pm.min_spare_servers = 1
+
pm.max_spare_servers = 19
+
}}
+
  
==== Date & Time ====
+
{{console|body=###i## /etc/init.d/php-fpm restart}}
Set the time and date for php web applications.  [http://php.net/manual/en/timezones.php full list of php timezones]
+
 
{{file|name=/etc/php/fpm-php5.6/php-fpm.conf|lang=|desc=limit workers|body=
+
====Clock shows the incorrect time====
[Date]
+
 
; Defines the default timezone used by the date functions
+
If rutorrent's clock displays the incorrect time/timezone then it can be changed.  
; http://php.net/date.timezone
+
 
;date.timezone =
+
{{file|name=/etc/php/fpm-php5.5/php.ini |lang=|desc=|body=
 +
date.timezone = "Europe/Athens"
 
}}
 
}}
  
the same procedures can be done for other php implementations at
+
A full list of supported timezones can be found at http://php.net/manual/en/timezones.php
*/etc/php/cli-php5.6/php.ini
+
 
*/etc/php/apache2-php5.6/php.ini
+
==== 502 ====
*/etc/php/cgi-php5.6/php.ini
+
502 Bad Gateway is caused by nginx being started and php-fpm not being started.
  
=== Media ===
 
==== Programming ====
 
{{#widget:YouTube|playlist=PL00694B0DAD604DE6}}
 
  
 +
{{PageNeedsUpdates}}
 
{{EbuildFooter}}
 
{{EbuildFooter}}

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

www-apps/rutorrent


Source Repository:Repository:Gentoo Portage Tree

http://code.google.com/p/rutorrent/

Summary: ruTorrent is a front-end for the popular Bittorrent client rTorrent


News

Drobbins

IP Space Migration Continues

All Funtoo user containers in the 8.28 IP space will be moving into our new IP space (172.97) over the next few days. If you have DNS set up -- be sure to watch your container and update to the new IP! container.host.funtoo.org DNS will be updated after the move.
2015-08-27 by Drobbins
Drobbins

Funtoo Hosting IP Move

Funtoo user containers with IPs in the 72.18.x.x range will be gradually migrating to new IP addresses this week. If you have DNS entries for your containers, please be aware that your DNS will need to be updated.
2015-08-11 by Drobbins
Drobbins

New ARM Stages

New ARM Stages, built with a new toolchain, are now hitting mirrors. Existing ARM users should re-install using these stages (dated Aug 3, 2015 or later,) rather than upgrade using emerge.
2015-08-06 by Drobbins
More...

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 Package:Rtorrent and is designed to look like utorrent =D

# emerge www-apps/rutorrent


Prerequisites

  • Install your web server Package:Nginx, and get Package: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:

# /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:

# /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.