<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>random blog</title>
	<atom:link href="http://s990we.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://s990we.com/wordpress</link>
	<description>Yet another random WordPress site</description>
	<lastBuildDate>Sat, 02 Oct 2010 09:24:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Install xmlrpc-c, libtorrent, rtorrent and rutorrent from svn</title>
		<link>http://s990we.com/wordpress/2010/10/install-xmlrpc-c-libtorrent-rtorrent-and-rutorrent-from-svn-2/</link>
		<comments>http://s990we.com/wordpress/2010/10/install-xmlrpc-c-libtorrent-rtorrent-and-rutorrent-from-svn-2/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 22:44:55 +0000</pubDate>
		<dc:creator>s990we</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://s990we.com/wordpress/?p=12</guid>
		<description><![CDATA[Set and create the dir we will use for svn checkouts Install everything you will need and remove xmlrpc or else rtorrent will complain because it uses the one from the repos Configure, make and make install xmlrpc-c Configure, make &#8230; <a href="http://s990we.com/wordpress/2010/10/install-xmlrpc-c-libtorrent-rtorrent-and-rutorrent-from-svn-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>Set and create the dir we will use for svn checkouts</h3>
<pre class="brush: bash; title: ; notranslate">
svnpath=&quot;/svn/&quot;
sudo mkdir $svnpath
sudo chown -R $USER:$USER $svnpath
</pre>
<h3>Install everything you will need and remove xmlrpc or else rtorrent will complain because it uses the one from the repos</h3>
<pre class="brush: bash; title: ; notranslate">
sudo apt-get remove libxmlrpc-c*
sudo apt-get install subversion gcc apache2 curl libcurl4-openssl-dev automake autoconf texinfo libapache2-mod-scgi build-essential libtool openssl libsigc++-2.0-dev libncurses-dev libcppunit-dev php5
</pre>
<h3>Configure, make and make install xmlrpc-c</h3>
<pre class="brush: bash; title: ; notranslate">
cd &quot;$svnpath&quot;
svn co http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced xmlrpc-c
cd xmlrpc-c
./configure
make
sudo make install
</pre>
<h3>Configure, make and make install libtorrent and rtorrent</h3>
<pre class="brush: bash; title: ; notranslate">
cd &quot;$svnpath&quot;
svn co svn://rakshasa.no/libtorrent/trunk rtorrent
cd rtorrent
cd libtorrent
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
cd ../rtorrent
./autogen.sh
./configure --with-xmlrpc-c
make
sudo make install
</pre>
<h3>Install libxmlrpc-c3-dev</h3>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install libxmlrpc-c3-dev</pre>
<h3>Get the latest rutorrent</h3>
<pre class="brush: bash; title: ; notranslate">
cd $svnpath

svn co http://rutorrent.googlecode.com/svn/trunk/rutorrent/ rutorrent
</pre>
<h3>To enabel scgi in apache run</h3>
<pre class="brush: bash; title: ; notranslate">sudo a2enmod scgi</pre>
<h3>To add a scgi mount in apache edit /etc/apache2/httpd.conf</h3>
<pre class="brush: bash; title: ; notranslate">sudo nano /etc/apache2/httpd.conf</pre>
<p>and add</p>
<pre class="brush: bash; title: ; notranslate">SCGIMount /RPC2 127.0.0.1:5000</pre>
<h3>Then restart apache</h3>
<pre class="brush: bash; title: ; notranslate">sudo service apache2 restart</pre>
<h3>We also have to add the mount to your rtorrent conf file</h3>
<p>In your ~/.rtorrent.rc file</p>
<pre class="brush: bash; title: ; notranslate">nano ~/.rtorrent.rc</pre>
<p>add</p>
<pre class="brush: bash; title: ; notranslate">scgi_port = localhost:5000</pre>
<h3>Create a symbolic link to rutorrent in /var/www/</h3>
<pre class="brush: bash; title: ; notranslate">sudo ln -s $svnpath/rutorrent /var/www/</pre>
<h3>Change ownership of rutorrent/share/torrents/ and rutorrent/share/settings to the one who runs the apache2 server</h3>
<p>Set www-data as group of rutorrent/share/torrents/ and rutorrent/share/settings/</p>
<pre class="brush: bash; title: ; notranslate">sudo chown -R $USER:www-data $svnpath/rutorrent/share/torrents/ $svnpath/rutorrent/share/settings/</pre>
<p>And allow the group (www-data) to edit those dirs</p>
<pre class="brush: bash; title: ; notranslate">chmod g+w $svnpath/rutorrent/share/torrents/ $svnpath/rutorrent/share/settings/</pre>
<h2>Test</h2>
<p>You can test rtorrent and rutorrent by running</p>
<pre class="brush: bash; title: ; notranslate">cd /tmp/
rtorrent http://releases.ubuntu.com/10.04.1/ubuntu-10.04.1-server-i386.iso.torrent
</pre>
<p>To download lucid server iso to /tmp</p>
<p>Then check so rutorrent is working by going to</p>
<p>http://server/rutorrent/</p>
<p>ex. http://192.168.0.2/rutorrent/</p>
<p>It should not be any errors.</p>
<p>And that is all.</p>
<p>When you want to upgrade xmlrpc-c, libtorrent, rtorrent or rutorrent simply run everything again. (see below for script)</p>
<h2>For lazy people</h2>
<p>bash script for everything</p>
<pre class="brush: bash; collapse: true; light: false; title: ; toolbar: true; notranslate">#Set and create the dir for all svn stuff...
svnpath=&quot;/svn/&quot;
sudo mkdir $svnpath
sudo chown -R $USER:$USER $svnpath
#Install everything you need
sudo apt-get remove libxmlrpc-c*
sudo apt-get install subversion gcc apache2 curl libcurl4-openssl-dev automake autoconf texinfo libapache2-mod-scgi build-essential libtool openssl libsigc++-2.0-dev libncurses-dev libcppunit-dev php5
#configure, make and make install xmlrpc-c
cd &quot;$svnpath&quot;
svn co http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced xmlrpc-c
cd xmlrpc-c
./configure
make
sudo make install
#configure, make and make install libtorrent and rtorrent
cd &quot;$svnpath&quot;
svn co svn://rakshasa.no/libtorrent/trunk rtorrent
cd rtorrent
cd libtorrent
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
cd ../rtorrent
./autogen.sh
./configure --with-xmlrpc-c
make
sudo make install
#install libxmlrpc-c3-dev
sudo apt-get install libxmlrpc-c3-dev
#get the latest rutorrent
cd $svnpath
svn co http://rutorrent.googlecode.com/svn/trunk/rutorrent/ rutorrent
#To enabel scgi in apache run
sudo a2enmod scgi
#run
sudo nano /etc/apache2/httpd.conf
#and add
#SCGIMount /RPC2 127.0.0.1:5000
#then restart apache
sudo service apache2 restart
#then in your .rtorrent.rc file
nano ~/.rtorrent.rc
#put
#scgi_port = localhost:5000
#in the file
#create a symbolic link to rutorrent in /var/www/
sudo ln -s $svnpath/rutorrent /var/www/
#set www-data as group of rutorrent/share/torrents/ and rutorrent/share/settings/
sudo chown -R $USER:www-data $svnpath/rutorrent/share/torrents/ $svnpath/rutorrent/share/settings/
# and allow the group (www-data) to edit those dirs
chmod g+w $svnpath/rutorrent/share/torrents/ $svnpath/rutorrent/share/settings/
</pre>
]]></content:encoded>
			<wfw:commentRss>http://s990we.com/wordpress/2010/10/install-xmlrpc-c-libtorrent-rtorrent-and-rutorrent-from-svn-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

