RuTorrent
- Get Dependancies
sudo apt-get update sudo apt-get upgrade sudo apt-get install subversion build-essential automake libtool libcppunit-dev libcurl3-dev \ libsigc++-2.0-dev unzip unrar curl libncurses-dev sudo apt-get install apache2 php5 php5-cli php5-curl
- Enabled scgi module
sudo apt-get install libapache2-mod-scgi a2enmod scgi
- Install XMLRPC
sudo mkdir /install cd /install sudo svn checkout http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c cd xmlrpc-c sudo ./configure --disable-cplusplus sudo make sudo make install
- Install rTorrent from PPA
add-apt-repository ppa:aroth/ppaadd-apt-repository ppa:nathan-renniewaldock/ppa apt-get update && apt-get upgrade apt-get install rtorrent
- rTorrent Config
Edit ~/.rtorrent.rc
directory = /var/local/storage/torrents/.incomplete session = /var/local/storage/torrents/.rtorrent.session bind = 127.0.0.1 port_range = 55556-55560 scgi_port = localhost:5000
- Install RuTorrent
cd /install sudo wget http://rutorrent.googlecode.com/files/rutorrent-3.3.tar.gz sudo tar xvf rutorrent-3.3.tar.gz sudo mv rutorrent /var/www sudo wget http://rutorrent.googlecode.com/files/plugins-3.3.tar.gz sudo tar xvf plugins-3.3.tar.gz sudo mv plugins /var/www/rutorrent sudo rm -rf /var/www/rutorrent/plugins/darkpal sudo chown -R www-data:www-data /var/www/rutorrent
- htpasswd
cd /var/www/rutorrent sudo nano .htaccess AuthUserFile /var/www/rutorrent/.htpasswd AuthName "ruTorrent login" AuthType Basic Require Valid-User
sudo htpasswd -c /var/www/rutorrent/.htpasswd usernamehere
sudo apt-get install screen
- Startup
Put the following file in /etc/init.d/ and rename it rtorrent, chmod +x /etc/init.d/rtorrent
http://www.hurlster.com/wiki/files/rtorrent.init
Libtorrent Mod
This is how to modify libtorrent to make it faster
Credit to https://calomel.org/rtorrent_mods.html
Using these mods will most likely get you banned from private and/or public trackers.
- Downloads
http://libtorrent.rakshasa.no/downloads/
- Decrease the polling time to connect to trackers
edit file: vi libtorrent-0.12.9/src/torrent/tracker.cc
old line #:49 m_normalInterval(1800),
new line #:49 m_normalInterval(600),
edit file: vi libtorrent-0.12.9/src/torrent/tracker.h
old line #:100 void set_normal_interval(int v) { if (v >= 60 && v <= 3600) m_normalInterval = v;}
new line #:100 void set_normal_interval(int v) { if (v >= 60 && v <= 600) m_normalInterval = v;}
- Increase the rate at which pieces are requested from other peers
edit file: vi libtorrent-0.12.9/src/protocol/peer_connection_leech.cc old line #:154 if (!download_queue()->canceled_empty() && m_downStall >= 6) new line #:154 if (!download_queue()->canceled_empty() && m_downStall >= 2)
- Build Instructions
libtorrent build: ./configure && make
This builds a .deb package for 0.12.9 for easy install.
checkinstall -D -y --install=no --fstrans=no --pkgname=libtorrent14 --pkgversion=0.12.9-3~gqwill69~precise \ --maintainer="Will Hughes <gqwill69@gmail.com>" --replaces="libtorrent14_0.12.9-3_amd64" --requires="libc6 (>= 2.10), libgcc1 (>= 1:4.1.1), \ libsigc++-2.0-0c2a (>= 2.0.2), libssl0.9.8 (>= 0.9.8m-1), libstdc++6 (>= 4.5)"
dpkg -i libtorrent14_0.12.9-1~gqwill69~natty1-1_amd64.deb
Very important to run this command after install of deb package
ldconfig
Performance Tweaks
- Increase ARP entried to remove the following error message
kernel: [144104.388601] ipv4: Neighbour table overflow.
On the fly change
sysctl -w net.ipv4.neigh.default.gc_thresh1=1024 sysctl -w net.ipv4.neigh.default.gc_thresh2=2048 sysctl -w net.ipv4.neigh.default.gc_thresh3=4096
Permanant change
nano /etc/sysctl.conf net.ipv4.neigh.default.gc_thresh1 = 1024 net.ipv4.neigh.default.gc_thresh2 = 2048 net.ipv4.neigh.default.gc_thresh3 = 4096
- Shorten RSS feed time
nano /var/www/rutorrent/plugins/rss/conf.php $updateInterval = 10; // in minutes