LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-08-2007, 09:52 AM   #1
slacksubgenius
LQ Newbie
 
Registered: Jun 2006
Location: Uk
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
How-to install and optimize rtorrent


rtorrent and libtorrent install
================================
#CTRL = ^

#You may have some of these already

sudo apt-get install build-essential libsigc++-2.0-dev pkg-config comerr-dev libcurl3-openssl-dev libidn11-dev libkadm55 libkrb5-dev libssl-dev zlib1g-dev libncurses5 libncurses5-dev

cd
mkdir rtorrent
cd rtorrent
wget http://libtorrent.rakshasa.no/downlo...t-0.7.4.tar.gz
wget http://libtorrent.rakshasa.no/downlo...-0.11.4.tar.gz
tar xvzf rtorrent-0.7.4.tar.gz
tar xvzf libtorrent-0.11.4.tar.gz


cd libtorrent-0.7.4/
./configure
make
sudo make install; sudo ldconfig

cd ../rtorrent-0.7.4
./configure --prefix=/usr/local/bin/
make
sudo make install; sudo ldconfig







# Preparation
===========

# Pick a port range for rtorrent and allow and forward ports on router/firewall
# I have used 51000-51010


mkdir ~/Torrents/; mkdir ~/Torrents/session; mkdir ~/Torrents/watch/




# I have used the example file from the wiki as a base
# This will:
# Save Torrents in "~/Torrents"
# Watch "~/Torrents/watch" for new torrents and stop torrents when deleted
# Allow incoming and try outgoing encryption, retrying without if necessary
# Using port range 51000-51010
# With an unlimited bandwidth throttle between 00:15 and 06:00 hours
# I have added the performace boost from the rtorrent wiki, change values as you think fit
# Seed torrents until ratio = 2.0 with at least 200 MB uploaded or else with a ratio of 20.0
# Please comment or change anything that is not wanted


nano /.rtorrent.rc


#Copy and Paste Below here
#Start of .rtorrent.rc

#Maximum and minimum number of peers to connect to per torrent.
#min_peers = 40
max_peers = 80

# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
max_peers_seed = -1

# Maximum number of simultanious uploads per torrent.
max_uploads = 15

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 0

# Default directory to save the downloaded torrents.
directory = ~/Torrents

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = ~/Torrents/session

# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=~/Torrents/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=

# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=100M

# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
schedule = ratio,60,60,stop_on_ratio=200,200M,2000

# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no

# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no

# Port range to use for listening.
port_range = 51000-51010

# Start opening ports at a random position within the port range.
#port_random = no

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = yes

# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = no

# Alternative calls to bind and ip that should handle dynamic ip's.
#schedule = ip_tick,0,1800,ip=rakshasa
#schedule = bind_tick,0,1800,bind=rakshasa

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
encryption = allow_incoming,try_outgoing,enable_retry

#
# Do not modify the following parameters unless you know what you're doing.
#

# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
hash_read_ahead = 8

# Interval between attempts to check the hash, in milliseconds.
hash_interval = 10

# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
hash_max_tries = 5

# Max number of files to keep open simultaniously.
#max_open_files = 128

# Number of sockets to simultaneously keep open.
#max_open_sockets = <no default>


#####Comment out this section if not needed
####scedule an unlimited download throttle at 00:15
schedule = throttle_1,00:00:15,24:00:00,download_rate=0

#####scedule an download throttle at 06:00
schedule = throttle_2,06:00:00,24:00:00,download_rate=50


#Finish of .rtorrent.rc


#Download torrents via firefox to ~/Torrents/watch to have them start automatically when
#you start rtorrent



##################################################
or if you are daring
##################################################

Downloading Torrents with elinks


sudo apt-get install elinks

nano .elinks/elinks.conf


################################
# Automatically saved options #
################################

## document.download.directory <str>
# Default download directory.
set document.download.directory = "~/Torrents/watch/"

## ui.language <language>
# Language of user interface. 'System' means that the language will
# be extracted from the environment dynamically.
set ui.language = "System"


## terminal.xterm.colors <num>
set terminal.xterm.colors = 1

# Automatically saved options
#

## terminal.xterm.type <num>
set terminal.xterm.type = 1
################################

#to save and quit
^+x +y


USING



screen
elinks http://YOUR-FAV-TORRENT-SITE
^+a +c
rtorrent
^+a +p
#Click on torrent to download
#click save
#hit enter to save in ~/Torrents/watch
^+a +n
#your torrent should be starting
^+a +d
exit #to logout



Please let me know if there are any mistakes etc.
 
Old 05-08-2007, 10:06 AM   #2
sidney.harrell
Member
 
Registered: Apr 2006
Location: Stafford, VA
Distribution: Ubuntu 6.06, 7.04, Slackware 11
Posts: 45

Rep: Reputation: 15
In a terminal, ssh into your desktop/server, start a screen session, and run rtorrent in the screen session. Now when you break your ssh connection, rtorrent will keep running in the screen session. You can come back sometime later, log back in with ssh, even from outside your lan if you set up port forwarding, pull up the list of running screens with
$ screen -ls
and reattach to the rtorrent screen session with
$ screen -r <pid#>

It's an awesome setup.
 
Old 05-08-2007, 10:15 AM   #3
slacksubgenius
LQ Newbie
 
Registered: Jun 2006
Location: Uk
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks, screen rocks doesn't it, I have just posted a thread in the security forum about securing ssh with this in mind, I use my blackberry and midpSSH to ssh in and screen -r.

Last edited by slacksubgenius; 05-08-2007 at 01:04 PM.
 
Old 10-20-2008, 09:25 AM   #4
macavity23
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Can name screens

Great howto!

The screen setup does indeed rock. I would add that you can name your screens: start it with 'screen -S rtorrent', and you can then re-attach to it later with 'screen -r rtorrent'; no more having to remember that pid.
 
  


Reply

Tags
cli, howto, torrent



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cant compile rtorrent ruskie Linux - Software 3 07-08-2010 01:57 PM
About rtorrent satimis Linux - Software 8 02-19-2008 08:36 AM
Problem with rtorrent asininity Linux - Software 12 04-15-2007 01:37 PM
trouble installing rtorrent morganix Linux - Server 6 12-18-2006 09:51 PM
Kernel, patch, optimize, buid, install Hexane Mandriva 3 01-27-2005 01:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration