RuTorrent rTorrent Lighttpd CentOS

somus1735

Member
May 25, 2018
833
0
16
Hi everyone!
I'm trying to make from RuTorrent rTorrent Lighttpd CentOS a big happy family.

Perfoming these steps on just installed CentOS 5.4

Code:
yum update
yum remove cups cups-libs irda-utils

Code:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rm rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Now we have to configure security (enable WWW):
Code:
system-config-securitylevel-tui
Lighttpd & php instalation:
Code:
yum install lighttpd
Code:
yum install lighttpd-fastcgi php-cli

vi /etc/php.ini
Code:
cgi.fix_pathinfo = 1
Enabling SCGI
vi /etc/lighttpd/lighttpd.conf
Code:
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
"mod_scgi",
# "mod_cml",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )
[...]

#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
)
)
)

scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"socket" => "/tmp/rpc.socket",

"check-local" => "disable"
)
)
)

Code:
service lighttpd restart
Let's check that php is functional
vi /srv/www/lighttpd/info.php
Code:
<?php
phpinfo();
?>and then http://you-server-ip/info.php


Code:
wget http://dag.wieers.com/rpm/packages/libsigc++20/libsigc++20-2.0.17-1.el5.rf.i386.rpm
rpm -Uhv libsigc++20-2.0.17-1.el5.rf.i386.rpm
Xmlrpc libtorrent and rtorrent instalation
Code:
rpm -Uhv http://www.fateyev.com/RPMS/RHEL5/i386/xmlrpc-c-1.14.8-1.el5.i386.rpm http://www.fateyev.com/RPMS/RHEL5/i386/xmlrpc-c-apps-1.14.8-1.el5.i386.rpm http://www.fateyev.com/RPMS/RHEL5/i386/libtorrent-0.12.6-1.el5.i386.rpm http://www.fateyev.com/RPMS/RHEL5/i386/rtorrent-0.8.6-4.el5.i386.rpm
ruTorrent instalation
Code:
yum install subversion
Code:
cd /srv/www/lighttpd/
svn checkout http://rutorrent.googlecode.com/svn/trunk/rtorrent

vi /srv/www/lighttpd/rtorrent/config.php
Code:
$scgi_port = 0;
$scgi_host = "unix:///tmp/rpc.socket";

~/.rtorrent.rc
Code:
check_hash = yes
enable_trackers = yes
encoding_list = UTF-8
scgi_local = /tmp/rpc.socket

If you have error while installing or runnig Lighttpd try this
Code:
mkdir -p /var/run/lighttpd/
chown lighttpd /var/run/lighttpd

Information sources:
http://www.howtoforge.com/installing-lighttpd-with-php5-and-mysql-support-on-centos-5.3
http://www.kernelhardware.org/lighttpd-and-centos-5/
http://www.fateyev.com/ru/blog/2009/libtorrent_el5_rpms
 

somus1735

Member
May 25, 2018
833
0
16
It started to work but now i have error:

Quote
Bad response: (500) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>500 - Internal Server Error</title> </head> <body> <h1>500 - Internal Server Error</h1> </body> </html>​


Any help is appreciated
 

jith45

Member
May 25, 2018
960
0
16
cheesy.gif cheesy.gif cheesy.gif
Thanks for the guide, I didn't realise they had rpms out for the latest rtorrent and libtorrent wink.gif . I've always compiled manually....lol

Wonslung is spot on as usual, I am using exactly what he has suggested on one of my servers, the rpc plugin and scgi based port.
 

somus1735

Member
May 25, 2018
833
0
16
Quote
try using a port based scgi or try the rpc plugin​


I've done some modifications to my conf files:
vi /root/.rtorrent.rc
Code:
check_hash = yes
enable_trackers = yes
encoding_list = UTF-8
scgi_port = 127.0.0.1:5000
max_uploads = 50
max_peers = 125
max_peers_seed = -1
peer_exchange = yes

vi /srv/www/lighttpd/rtorrent/config.php
Code:

<?php
// configuration parameters

define(&#39;HTTP_USER_AGENT&#39;, &#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0&#39;);
define(&#39;HTTP_TIME_OUT&#39;, 30);
define(&#39;HTTP_USE_GZIP&#39;, true);

define(&#39;RPC_TIME_OUT&#39;, 15); // in seconds
define(&#39;DO_DIAGNOSTIC&#39;, true);

$uploads = &#39;./torrents&#39;; // temp directory for uploaded torrents, without tail slash
$settings = &#39;./settings&#39;; // settings directory, without tail slash
$log_file = &#39;/tmp/errors.log&#39;; // path to log file (comment or make empty to disable logging)

$scgi_port = 5000;
$scgi_host = "127.0.0.1";

// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
// $XMLRPCMountPoint = "/RPC2";

$pathToPHP = &#39;&#39;; // Something like /bin/php. If empty, will be founded in PATH.
$pathToCurl = &#39;&#39;; // Something like /bin/curl. If empty, will be founded in PATH.

// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//

// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
?>

I still have error:
Quote
[04.04.2010 22:27:54] WebUI started.
[04.04.2010 22:27:55] Bad link to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.
[04.04.2010 22:27:56] Bad response: (500) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>500 - Internal Server Error</title> </head> <body> <h1>500 - Internal Server Error</h1> </body> </html>​


P.S I'm trying to bring up the rutorrent site when i'm logged into SSH session and running rtorrent