Since Chogie.info has been offline for quite some time, we thought what a terrible waste it would be for the Internet to lose those excellent rTorrent/ruTorrent tutorials. So, we kept them alive! Here’s Part 1:
Source from - http://chogie.info/?paged=3
Originally titled - “rTorrent + ruTorrent UPDATED 15/01/10″
====================================================
Many guides on the net, just don’t work, this one does, confirmed working on many servers, remote and local!
Commands you can copy & paste are coloured lime, and comments have been commented out with a pound sign. #
sudo apt-get install apache2.2-common apache2-utils autoconf automake autotools-dev binutils build-essential bzip2 ca-certificates comerr-dev cpp cpp-4.1 dpkg-dev file g++ g++-4.1 gawk gcc gcc-4.1 libapache2-mod-php5 libapr1 libaprutil1 libc6-dev libcurl3 libcurl4-openssl-dev libexpat1 libidn11 libidn11-dev libkadm55 libkrb5-dev libmagic1 libncurses5-dev libneon26 libpcre3 libpq5 libsigc++-2.0-dev libsqlite0 libsqlite3-0 libssl-dev libssp0-dev libstdc++6-4.1-dev libsvn1 libtool libxml2 lighttpd linux-libc-dev lynx m4 make mime-support ntp ntpdate openssl patch perl perl-modules php5 php5-cgi php5-common php5-sqlite php5-cli pkg-config screen sqlite subversion ucf zlib1g-dev php5-xmlrpc libapache2-mod-scgi
# For uBuntu 9.10 Karmic Kola some packages have changed, so run this ONLY if your running Karmic Kola.
sudo apt-get install apache2.2-common apache2-utils autoconf automake autotools-dev binutils build-essential bzip2 ca-certificates comerr-dev cpp cpp-4.1 dpkg-dev file g++ g++-4.1 gawk gcc gcc-4.1 libapache2-mod-php5 libapr1 libaprutil1 libc6-dev libcurl3 libcurl4-openssl-dev libexpat1 libidn11 libidn11-dev libkdb5-4 libkrb5-dev libmagic1 libncurses5-dev libneon26 libpcre3 libpq5 libsigc++-2.0-dev libsqlite0 libsqlite3-0 libssl-dev libssp0-dev libstdc++6-4.1-dev libsvn1 libtool libxml2 lighttpd linux-libc-dev lynx m4 make mime-support ntp ntpdate openssl patch perl perl-modules php5 php5-cgi php5-common php5-sqlite php5-cli pkg-config screen sqlite subversion ucf zlib1g-dev php5-xmlrpc libapache2-mod-scgi
# Edit Apache default server config:
sudo nano /etc/apache2/sites-enabled/000-default
# Add the following lines, above the last “< /VirtualHost >”
LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000
# restart the webserver
sudo /etc/init.d/apache2 restart
# if you want to live on the edge, SVN the lastest versions.
svn co svn://rakshasa.no/libtorrent/trunk/libtorrent
svn co svn://rakshasa.no/libtorrent/trunk/rtorrent
# Or be soft and use the latest stables.
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.5.tar.gz
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.5.tar.gz
# extract the tar.gz’s
tar -xvzf libtorrent-0.12.5.tar.gz
tar -xvzf rtorrent-0.8.5.tar.gz
rm *.tar.gz
svn co https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced/
# Compile xmlrpc-c
cd advanced
./configure –disable-cplusplus
make
sudo make install
cd ..
NOTE: as rtorrent/libtorrent as been “advanced” to versions 0.8.6 and 0.12.6, there’s been troubles compiling both from source, there’s a work around.
# Before running any ./autogen.sh or ./configure commands, it’s been found that you have to run
rm -f scripts/{libtool,lt*}.m4
And this will now allow you to compile the newer versions of libtorrent/rtorrent.
# compile libtorrent (this is the part that takes the longest, making libtorrent)
cd <to libtorrent directory>
./autogen.sh
./configure –prefix=/usr
make
sudo make install
cd ..
# Compile rtorrent
cd <to rtorrent directory>
./autogen.sh
./configure –with-xmlrpc-c
# make sure you see “checking for XMLRPC…. OK” near the end of the outputted text”
make
sudo make install
# rtorrent will not run untill this command is ran.
sudo ldconfig
# We’ll need to keep these folders/files for incase you want to uninstall them, so we’ll just make them hidden folders.
mv advanced .advanced
mv <libtorrent directory> <.libtorrent directory>
mv <rtorrent directory> <.rtorrent directory>
# now to install rutorrent.
cd /var/www/
sudo wget http://rutorrent.googlecode.com/files/rtorrent-2.7.tar.gz
sudo tar -xvzf rtorrent-2.7.tar.gz
sudo rm *.tar.gz
sudo chmod 777 rtorrent
# Now we have are webui up and running, we need to now configure rtorrent.
cd ~
nano .rtorrent.rc
# copy the content from the link below into the nano editor, and make changes you need.
# http://pastebin.com/f146fed2
# For this example we’re user admin, so we need to make the directorys, outlined in the rtorrent.rc file.
mkdir download
mkdir torrent
mkdir .session
chmod 777 download
chmod 777 torrent
chmod 777 .sesson
# either run rtorrent as normal or with screen so you can close the ssh window
rtorrent
screen rtorrent
# Thats it, you should now have a fully working rutorrent/xmlrpc-c and rtorrent
# This as been tested on a kimsufi server running ubuntu 9.04/9.10 and Debian 5.0
As rutorrent doesn’t require any user auth, you might want to consider .htaccess passwording it.