Linux Step By Steps

Getting started with Bit Torrent
Written by Net Llama! on 23-April-2003.

I'm going to start by explaining a bit about how Bit Torrent works.  If that doesn't interest you, feel free to skip to the next section.  Bit Torrent is an open source protocol for peer to peer file distribution.  From an end user standpoint its somewhat similar to the old (now defunct) Napster, and the more recent Kazaa networks.  You can commonly find everything from Linux distro ISOs to music, to comic book captures in Bit Torrent accessible formats.  One of the primary differences is that Bit Torrent distributes the file sharing amongst everyone who currently is downloading or has downloaded a particular file.  So, for example, let say that you are using Bit Torrent to download the new Redhat-9 ISO images.  Once you start downloading it, anyone else who starts downloading it after you might actually be downloading their copy from the portion that you already downloaded, or from any other person who has already started downloading, or completed downloading the RH9 ISOs.  This helps to distribute the load, so that files can more rapidly be redistributed, and so that there isn't a single point of failure.

Now you're probably already thinking, what if I don't want to share what I've downloaded, or how can I control what others can download from me?  The Bit Torrent protocol automatically shares the file you're in the process of downloading.  If you aren't comfortable with that premise, then Bit Torrent is not for you.  However, the instant you finish downloading a file, you can terminate the daemon that is handling the download, and prevent anyone from downloading from you.  Additionally, you need to create 'torrent' files in order for unique files to be downloadable from your computer, so without them none of the file content of your computer is available to others.  Now part of the beauty of Bit Torrent is that everyone can take part in the process of sharing files with everyone else.  So if you opt to terminate the daemon, then you're cutting others off from what you've just acquired.  The generally acceptable practice is to leave the download daemon running for at least 24 hours after you finish, so that the file redistribution can continue unimpeded.

For those of you who are feeling generous, you're most likely now wondering how you can create 'torrent' files so that you can actively share files.  The primary requirement is that you must have a static IP address, otherwise there will be no means for others to connect and access the file(s) that you are sharing.  If you're ok in that department then the next big requirement is that you must be running a web server (most likely Apache in the Linux world) with which to serve up the torrent files you're sharing.  If you've gotten this far, the remainder of the process is well covered in the README that comes with Bit Torrent.  The purpose of this SxS is to get folks started with Bit Torrent, and by started, I mean downloading and sharing files, not neccesarily serving them.

A quick note about torrent files:  torrent files aren't actually the files that contain what you plan to share.  They merely contain instructions for the remote user's Bit Torrent download daemon on where to find the files, and how to verify that they are authentic (with a confirmation MD5 hash). 

In order to use Bit Torrent, you will need to have the following components installed and/or downloaded:
  1. Bit Torrent
  2. python-2.x  [RPM] or [TARBALL]
These are only neccesary if you want the Bit Torrent GUI (you do not need the GUI to fully utilize Bit Torrent, however if you want the ability to click on Bit Torrent URLs in your web browser and spawn Bit Torrent, you will need the GUI):
  1. glib
  2. gtk+
  3. wxPython
NOTE: Most recent Linux distros already come with python-2.x, glib & gtk+, so check your distro before you waste time downloading, building or installing them again.

Here is the order in which all the components must be installed.  You can skip over any components that you already have installed, or the components that are only needed for the GUI:
  1. glib: this has a straightforward "./configure, make, make install" build and install process
  2. gtk+: this also has a straightforward "./configure, make, make install" build and install process
  3. python: if you choose to install from the tarball, then it has a straightfoward "./configure,. make, make install" build and install process.  However note that if you already have python-1.x installed, you will need to make some configurational changes on your system to get Bit Torrent to work.  I'll discuss this further down.
  4. wxpython: just install the RPM, or wait close to an hour for the source to build, its HUGE.
  5. Bit Torrent: untar the tarball in somewhere like /usr/local/bin and you'll end with the entire package sitting in /usr/local/bin/BitTorrent-3.2.1b/. If you already have python-1.x installed, in addition to python-2.x, you will need to either rename/move the python(1.x) binary so that its called something other than plain old 'python', or uninstall python-1.x altogher.  Keep in mind that you might have other apps that need or require python-1.x, so uninstalling may not be a safe option.  Bit Torrent must be able to call plain old 'python', and that 'python' must be the 2.x version.
If you've installed the required packages for the Bit Torrent GUI, then you can setup your web browser to automagically run Bit Torrent when you click on a torrent file URL.  To do this with Mozilla or Netscape (6.x or 7.x) follow these steps:
Alternatively, you can just save the torrent files to disk, and fire up Bit Torrent manually.  torrent files are usually between 20k & 100k in size.  Here's how you can run Bit Torrent from a console (non-GUI) once you've saved the torrent file: file.torrent

Note that file.torrent is just an example name for the file.   Please keep in mind that once your download completes, you should not close the window, or you cut down on the available bandwidth for others.

I'm sure that by now you're thinking, "sounds great, where are all these files??".  There are an ever growing number of websites that collect Bit Torrent URLs.  Here are a selection of my favorites:
Two excellent forums for Bit Torrent are hosted on Yahoo groups:
BitTorrent: very technical, a developers group
torrent-talk: end user discussion of Bit Torrent
Linux distro ISOs at rpmfind:
Another daily updated listing of Bit Torrent sites:
One of the best sites listing Bit Torrents (updated continuously):