Difference between revisions of "How To Install rTorrent"

From AwkwardTV
Jump to: navigation, search
(New page: ==rTorrent== What you will need: # Copy of rTorrent compiled for Intel OS X. # Copies of <code>tar</code>, <code>bzip2</code> and <code>bunzip2</code> from [http://www.opensource.apple.com...)
 
m (Failure to install on Apple TV Take 3)
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==rTorrent==
+
What is rTorrent?<br>
What you will need:
+
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. The library differentiates itself from other implementations by transfering directly from file pages to the network stack. On high-bandwidth connections it is able to seed at 3 times the speed of the official client. The client uses ncurses and is ideal for use with screen or dtach. It supports saving of sessions and allows the user to add and remove torrents.
# Copy of rTorrent compiled for Intel OS X.
+
==rTorrent - What you will need:==
# Copies of <code>tar</code>, <code>bzip2</code> and <code>bunzip2</code> from [http://www.opensource.apple.com/darwinsource/images/darwinx86-801.iso.gz Darwin x86 ISO]. (Located in <code>/usr/bin</code>&nbsp;)
+
# [http://code.google.com/p/rtorrent-appletv/ Copy of rTorrent] compiled for Intel OS X. (New version! -April 15, 2008)
#* Having <code>nano</code> and <code>screen</code> helps a lot, too.
+
# An AppleTV (no Take 3, see below) set up with [[Install SSH|SSH]] access.
# An AppleTV set up with SSH access.
+
# Patience, padawan.
  
 
==Here is how to install!==
 
==Here is how to install!==
First, gather the necessary files together in a single folder for ease of organization (not necessary though), and use scp (or your favorite ftp or sftp client, such as [http://cyberduck.ch/ Cyberduck] on OS X or [http://filezilla.sourceforge.net/ FileZilla] on Windows - see their instructions) to transfer them to your AppleTV. In the following examples, replace <code>192.168.0.5</code> with whatever your AppleTV's address is. Open up Terminal.app and do:
+
As with anything in Unix, there's usually a few ways to do things. Clearly things will differ if you have your own username set up on the AppleTV, if you set up a different sshd, if you used a pre-authorized key, and so on. I will center this on how-to from a relatively stock OS X perspective. First, unarchive the file on your local machine, and use scp (or your favorite ftp or sftp client, such as [http://cyberduck.ch/ Cyberduck] on OS X, or [http://filezilla.sourceforge.net/ FileZilla] on Windows - see their instructions) to transfer them to your AppleTV. In the following examples, replace <code>192.168.0.5</code> with whatever your AppleTV's address is. On OS X, open up Terminal.app and do:
<pre>scp tar frontrow@192.168.0.5:
+
<pre>scp -1r rtorrent-0.7.4-osx frontrow@192.168.0.5:</pre>
scp bunzip2 frontrow@192.168.0.5:</pre>
 
Or, if all your files are in the same folder, open up Terminal.app, go to that folder, and do:
 
<pre>cd myfoldername
 
scp * frontrow@192.168.0.5:</pre>
 
 
 
 
Now, log in to your AppleTV with SSH:
 
Now, log in to your AppleTV with SSH:
 
<pre>ssh frontrow@192.168.0.5</pre>
 
<pre>ssh frontrow@192.168.0.5</pre>
  
 
Once you're in, do:
 
Once you're in, do:
<pre>./bunzip2 rtorrent-0.7.4-osx.tar.bz2
+
<pre>cd rtorrent-0.7.4-osx
./tar xvf rtorrent-0.7.4-osx.tar</pre>
+
sudo ./installme</pre>
Alternately, you can copy <code>tar</code>, <code>bzip2</code> and <code>bunzip2</code> to your <code>/usr/bin</code> directory (see next step!) This will make your root filesystem writable, so be careful.
 
<pre>sudo mount -uw /</pre>
 
(The next step is optional!)
 
<pre>sudo cp -n tar /usr/bin
 
sudo cp -n bzip2 /usr/bin
 
sudo cp -n bunzip2 /usr/bin
 
sudo cp -n nano /usr/bin
 
sudo cp -n screen /usr/bin</pre>
 
Note that these must be correctly chmodded, if they are not already, with<br><code>chmod +x &lt;filename&gt;</code><br>before you copy or<br><code>sudo chmod +x /usr/bin/&lt;filename&gt;</code><br>afterward. They may not need this, but I don't think it hurts to do it again if you're in doubt. Anyway, then you don't need to type "./" in front of executing these commands anymore. If you do this before extracting the rTorrent archive, you can use<br><code>tar xjvf rtorent-0.7.4-0sx.tar.bz2</code> - all one step.<br>
 
Since the root filesystem is still writable, we need to &mdash; if they do not already exist &mdash; create the following directories:
 
<pre>sudo mkdir -p /usr/local/bin
 
sudo mkdir /usr/local/lib</pre>
 
Then move our files into place!
 
<pre>sudo cp rtorrent-0.7.4-osx/rtorrent /usr/local/bin
 
sudo cp rtorrent-0.7.4-osx/libtorrent.* /usr/local/lib
 
sudo mount -ur /</pre>
 
  
 
==Environment==
 
==Environment==
 
Now you may create a file called <code>.profile</code> in your home directory, either by using <code>nano</code> and pasting the following, or just do:
 
Now you may create a file called <code>.profile</code> in your home directory, either by using <code>nano</code> and pasting the following, or just do:
 
<pre>echo export PATH="/bin:/sbin:/usr/local/bin:/usr/bin:/usr/sbin" > ~/.profile</pre>
 
<pre>echo export PATH="/bin:/sbin:/usr/local/bin:/usr/bin:/usr/sbin" > ~/.profile</pre>
 +
''CAUTION!  This will erase the previous contents of your ~/.profile file, if one already existed!''<br>
 
There is also a more global way of doing this, if you set up your path in the file <code>/etc/profile</code>
 
There is also a more global way of doing this, if you set up your path in the file <code>/etc/profile</code>
  
 
Now just run <code>rtorrent</code>, or better yet, <code>screen rtorrent</code> and you have a text-mode BitTorrent client on your AppleTV! What's more convenient than that! The basics of using screen is to type Ctrl+A then Ctrl+D and you can exit out of things, but leave rTorrent running. Next time you need to access it, SSH back in to your AppleTV and type <code>screen -rd</code> and boom!
 
Now just run <code>rtorrent</code>, or better yet, <code>screen rtorrent</code> and you have a text-mode BitTorrent client on your AppleTV! What's more convenient than that! The basics of using screen is to type Ctrl+A then Ctrl+D and you can exit out of things, but leave rTorrent running. Next time you need to access it, SSH back in to your AppleTV and type <code>screen -rd</code> and boom!
 +
 +
== Unrar ==
 +
Some torrent downloads are packaged into lots of little rar files.
 +
 +
download [http://www.rarlab.com/rar/rarosx-3.8.b2.tar.gz rar] for macos x
 +
 +
open rar and scp unrar to /Users/frontrow
 +
 +
<pre>
 +
sudo mv /Users/frontrow/unrar /usr/local/bin/
 +
chmod +x /usr/local/bin/unrar
 +
</pre>
 +
 +
==Interface==
 +
one of the options to interface with rTorrent is the excellent ntorrent a java interface that allows to control everything form a user friendly graphical interface.
 +
 +
to connect:
 +
* HOST: appletv.local
 +
*PORT: 22
 +
* SOCKET PORT: 5000
 +
* USERNAME: frontrow
 +
* PASSWORD: frontrow
 +
.
 +
you can even add files from the java interface
 +
download from here:  http://code.google.com/p/ntorrent/
 +
 +
==Failure to install on Apple TV Take 3==
 +
On Apple TV Take 3, rtorrent fails to install. The installer exits with this error:
 +
<nowiki>
 +
dyld: Symbol not found: __ZTIN3KJS11InterpreterE
 +
  Referenced from:
 +
/System/Library/PrivateFrameworks/JavaScriptGlue.framework/Versions/A
 +
/JavaScriptGlue
 +
  Expected in:
 +
/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaSc
 +
riptCore
 +
 +
./installme: line 12:  172 Trace/BPT trap          installer -pkg rtorrent-
 +
0.7.9-osx.pkg -target /
 +
chown: /Users/frontrow/.rtorrent.rc: No such file or directory</nowiki>
 +
 +
*Update Install on Apple TV Take 3:<br />
 +
 +
1) Install NitoTv <br />
 +
2) Run Smart Installer <br />
 +
3) Install rTorrent:<br />
 +
<code>
 +
>sudo ./installme (let it fail) <br />
 +
>sudo mount -uw / <br />
 +
>sudo DYLD_FRAMEWORK_PATH='/System/Library/Frameworks/OSXFrames/' installer -pkg rtorrent-0.7.9-osx.pkg -target / <br />
 +
>sudo mount -ur / <br />
 +
>sudo chown frontrow:frontrow /Users/frontrow/.rtorrent.rc /Users/frontrow/.rtorrent_session /Users/frontrow/Torrents /Users/frontrow/Downloads <br />
 +
</code>
 +
 +
==Resources==
 +
[http://libtorrent.rakshasa.no/ rTorrent site] - Read the man page and the common tasks!<br>
 +
[http://code.google.com/p/rtorrent-appletv/ Where to get rTorrent for AppleTV] - Runs on any Intel Mac<br>
 +
[[Install SSH without an Intel_Mac]] - It's a good idea to use the sshd from this how-to, since it supports SSH2 and you don't need to use -1 when SSH'ing anymore.<br>
 +
See also: [[How To Install Irssi]]
 +
 +
[[Category:How-to]]

Latest revision as of 10:39, 29 December 2009

What is rTorrent?
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. The library differentiates itself from other implementations by transfering directly from file pages to the network stack. On high-bandwidth connections it is able to seed at 3 times the speed of the official client. The client uses ncurses and is ideal for use with screen or dtach. It supports saving of sessions and allows the user to add and remove torrents.

rTorrent - What you will need:

  1. Copy of rTorrent compiled for Intel OS X. (New version! -April 15, 2008)
  2. An AppleTV (no Take 3, see below) set up with SSH access.
  3. Patience, padawan.

Here is how to install!

As with anything in Unix, there's usually a few ways to do things. Clearly things will differ if you have your own username set up on the AppleTV, if you set up a different sshd, if you used a pre-authorized key, and so on. I will center this on how-to from a relatively stock OS X perspective. First, unarchive the file on your local machine, and use scp (or your favorite ftp or sftp client, such as Cyberduck on OS X, or FileZilla on Windows - see their instructions) to transfer them to your AppleTV. In the following examples, replace 192.168.0.5 with whatever your AppleTV's address is. On OS X, open up Terminal.app and do:

scp -1r rtorrent-0.7.4-osx frontrow@192.168.0.5:

Now, log in to your AppleTV with SSH:

ssh frontrow@192.168.0.5

Once you're in, do:

cd rtorrent-0.7.4-osx
sudo ./installme

Environment

Now you may create a file called .profile in your home directory, either by using nano and pasting the following, or just do:

echo export PATH="/bin:/sbin:/usr/local/bin:/usr/bin:/usr/sbin" > ~/.profile

CAUTION! This will erase the previous contents of your ~/.profile file, if one already existed!
There is also a more global way of doing this, if you set up your path in the file /etc/profile

Now just run rtorrent, or better yet, screen rtorrent and you have a text-mode BitTorrent client on your AppleTV! What's more convenient than that! The basics of using screen is to type Ctrl+A then Ctrl+D and you can exit out of things, but leave rTorrent running. Next time you need to access it, SSH back in to your AppleTV and type screen -rd and boom!

Unrar

Some torrent downloads are packaged into lots of little rar files.

download rar for macos x

open rar and scp unrar to /Users/frontrow

sudo mv /Users/frontrow/unrar /usr/local/bin/
chmod +x /usr/local/bin/unrar

Interface

one of the options to interface with rTorrent is the excellent ntorrent a java interface that allows to control everything form a user friendly graphical interface.

to connect:

  • HOST: appletv.local
  • PORT: 22
  • SOCKET PORT: 5000
  • USERNAME: frontrow
  • PASSWORD: frontrow

. you can even add files from the java interface download from here: http://code.google.com/p/ntorrent/

Failure to install on Apple TV Take 3

On Apple TV Take 3, rtorrent fails to install. The installer exits with this error: dyld: Symbol not found: __ZTIN3KJS11InterpreterE Referenced from: /System/Library/PrivateFrameworks/JavaScriptGlue.framework/Versions/A /JavaScriptGlue Expected in: /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaSc riptCore ./installme: line 12: 172 Trace/BPT trap installer -pkg rtorrent- 0.7.9-osx.pkg -target / chown: /Users/frontrow/.rtorrent.rc: No such file or directory

  • Update Install on Apple TV Take 3:

1) Install NitoTv
2) Run Smart Installer
3) Install rTorrent:
>sudo ./installme (let it fail)
>sudo mount -uw /
>sudo DYLD_FRAMEWORK_PATH='/System/Library/Frameworks/OSXFrames/' installer -pkg rtorrent-0.7.9-osx.pkg -target /
>sudo mount -ur /
>sudo chown frontrow:frontrow /Users/frontrow/.rtorrent.rc /Users/frontrow/.rtorrent_session /Users/frontrow/Torrents /Users/frontrow/Downloads

Resources

rTorrent site - Read the man page and the common tasks!
Where to get rTorrent for AppleTV - Runs on any Intel Mac
Install SSH without an Intel_Mac - It's a good idea to use the sshd from this how-to, since it supports SSH2 and you don't need to use -1 when SSH'ing anymore.
See also: How To Install Irssi