INSTALLING RTORRENT + RUTORRENT ON CENTOS 5
So i just finished installing/compiling rtorrent + rutorrent, for a friend of mine, on his server running Centos5. I was shocked there werent any good tutorials around on how to do this, so I figured why not make one myself for all those who want to run Centos out there.
INFO : If u are not good with Linux then i suggest u install your server with Ubuntu/Debian based Distro's, as they are more user friendly. Centos can be a little complicated at times, even for the experienced user.
NOTE : This tutorial is going off the basis that u already have a created user with sudo and u are ready to get down to the rtorrent install. Lets go ahead and login as root through SSH using a terminal like Putty.
PART 1 : Update System & get dependencies :
A : Lets update our system and get some dependencies to compile rtorrent.
- # yum update
- # yum install gcc gcc-c++ m4 make automake libtool pkgconfig perl openssl-devel ncurses-devel screen subversion lighttpd lighttpd-fastcgi php
PART 2 : Required software for rtorrent :
NOTE : First exit out of root and switch/login with your "super user" and make sure u are in your "home/user" dir > "$ cd /home/user"
A : Next we need to download our software and rtorrent :
NOTE : U could also get rtorent from svn, but u need the g++ compiler 4.3 or greater for it to "make" correctly. Im not getting into that and im just gonna use rtorrent stable and g++ from yum for now.
- $ mkdir apps && cd apps
- $ svn co https://xmlrpc-c.svn.sourceforge.net...mlrpc-c/stable xmlrpc-c
- $ wget http://ftp.acc.amu.se/pub/GNOME/sources/libsigc++/2.2/libsigc-++2.2.4.tar.gz
- $ wget http://curl.haxx.se/download/curl-7.19.4.tar.gz
- $ wget http://libtorrent.rakshasa.no/downlo...-0.12.6.tar.gz
- $ wget http://libtorrent.rakshasa.no/downlo...t-0.8.6.tar.gz
PART 3 : Compile what we downloaded :
A : Libsigc++2.2.4
- $ tar zxfv libsigc++-2.2.4.tar.gz
- $ cd libsigc++-2.2.4
- $ ./configure
- $ make
- $ sudo make install
- $ cd ..
B : Curl 7.19.4
- $ tar zxfv curl-7.19.4.tar.gz
- $ cd curl-7.19.4
- $ ./configure
- $ make
- $ sudo make install
- $ cd ..
C : xmlrpc-c
- $ cd xmlrpc-c
- $ ./configure --disable-cplusplus
- $ make
- $ sudo make install
- $ cd ..
NOTE : For libtorrent/rtorernt u need to remove the m4 scripts or u will get errors on both installs.
D : libtorrent
- $ tar zxfv libtorrent-0.12.6.tar.gz
- $ cd libtorrent-0.12.6
- $ rm -f scripts/{libtool,lt*}.m4
- $ ./autogen.sh
- $ ./configure
- $ make
- $ sudo make install
- $ cd ..
E : rtorrent
- $ tar zxfv rtorrent-0.8.6.tar.gz
- $ cd rtorrent-0.8.6
- $ rm -f scripts/{libtool,lt*}.m4
- $ ./autogen.sh
- $ ./configure --with-xmlrpc-c
- $ make
- $ sudo make install
- $ cd ..
- $ rm *.tar.gz
- $ cd ..
PART 4 : Make dir's & rtorrent config file :
A : Now we need to make the dir's rtorrent will use and also give read/write access to them.
- $ mkdir rtorrent && cd rtorrent
- $ mkdir downloads
- $ mkdir torrents
- $ mkdir .session
- $ cd .. && chmod 777 rtorrent -R
B : Next lets make the rtorrent config file. U can copy and paste this file into "nano" (text editor) and save (ctrl + o) & exit (ctrl + x) > pastebin - collaborative debugging tool
- $ nano .rtorrent.rc
NOTE : make sure u change the dir's in the sample config file to your path of the folders u created above.
PART 5 : Start rtorrent in screen
A : Lets go ahead and start rtorrent in screen. Screen will keep rtorrent session alive after u close out your terminal.
- $ screen -S rt rtorrent
NOTE : To detach the rtorrent screen session (ctrl a-d). To re-attach screen session ( $ screen -x rt). To see a list of all current running screen sessions ( $ screen -list)
PART 6 : lighttpd
A : We already installed lighttpd from "PART 1", but now we have to make some important changes. First lets "su" then open the config file:
- $ su
Password:
- # nano /etc/lighttpd/lighttpd.conf
B : Now make the following changes. U need to bind lighttpd on port 81 so look for the following line and un-comment it :
"server.port =81"
C : Now make sure u also un-comment the following in the "server.modules" :
"mod_scgi",
"mod_fastcgi",
"mod_auth",
D : Lighttpd config file on Centos already comes with all the lines we need to add, but u will need to un-comment them all. To make it easier for u, u can just leave them there as is & add this to the very end of file :
PHP Code:scgi.server = (
"/srv/www/lighttpd/rutorrent/RPC2" => # RT_DIR
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable"
)
)
)
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))
E : Start lighttpd :
- # /etc/init.d/lighttpd start
PART 7 : rutorrent :
A : Now we need to download rutorrent with our web-server user to our Document Root dir, so rutorrent is accessible through our web-browser. In my config the webserver user is "www-data", so this is what ill use in the tutorial.
NOTE : The default location for this is "/srv/www/lighttpd", but u may need to double check in the lighttpd.conf just to make sure. Look for this line > "server.document.root = " and that will be the location to where u need to install rutorrent.
B : Switch to web-server user & CD to the document.root dir and download rutorrent :
- # su www-data
- # cd /srv/www/lighttpd
- # wget http://rutorrent.googlecode.com/file...ent-2.8.tar.gz
- # tar xzf rtorrent-2.8.tar.gz
- # rm rtorrent-2.8.tar.gz
C : To install plugins u need to do this :
- # cd /srv/www/lighttpd/rtorrent/plugins/
- # wget http://rutorrent.googlecode.com/files/rpc-1.0.tar.gz
- # tar xzf rpc-1.0.tar.gz
- # rm rpc-1.0.tar.gz
D : Switch back to root & Give read/write to the dir rutorrent :
- # su
password :
- # chmod 777 /srv/www/lighttpd/rtorrent -R
E : Now we need to open the rutorrent config and specify the /RPC2 mount :
- # nano /srv/www/lighttpd/rtorrent/conf/config.php
Then look for "XMLRPCMountPoint" and add this to that line :
- /srv/www/lighttpd/rtorrent/RPC2
NOTE : Make sure when u add that to the line, u put it in between the '-' or it will not take effect and show errors.
Restart Lighttpd :
- # /etc/init.d/lighttpd restart
Now u can reach rutorrent in your web-browser on your home computer. U need to make sure u specify port #81 in the address > hxxp://serverIP:81/rtorrent
**Thats it for compiling rtorrent on Centos. Remember if u have any issues, questions or found some mistakes please post here. this tutorial was soley written by me, but i learned this over time through various help & sources**









3Likes
LinkBack URL
About LinkBacks

Reply With Quote






