Stable versions of tor
Debian packages have been uploaded to the set of official stable (lenny), unstable (sid), and testing (squeeze) Debian packages.
If you are running Debian oldstable (etch) you must first add some lines to your /etc/apt/sources.list file.
If you run squeeze (testing) you may want to add a sources.list entry too. That way you always get the latest version of Tor, even when it has not propagated to testing yet.
Do not use the packages in ubuntu's universe. They are not maintained and most likely old and therefore miss out on stability and possibly security fixes.
For tor's stable version (for amd64 and i386):
deb http://mirror.noreply.org/pub/tor <DISTRIBUTION> main deb-src http://mirror.noreply.org/pub/tor <DISTRIBUTION> main
where <DISTRIBUTION> should be replaced with either etch, lenny, or sid, or - if you are using ubuntu - dapper, gutsy, hardy, intrepid, or jaunty.
For instance if you are running etch you would add:
deb http://mirror.noreply.org/pub/tor etch main deb-src http://mirror.noreply.org/pub/tor etch main
To install the packages, issue the following commands:
$ apt-get update $ apt-get install tor
Verifying signatures with apt 0.6.x
If you are using apt version 0.6 or later (if you are using etch or later, or ubuntu then you are) you may want to add weasel's key to your apt-keyring, so it can verify the sources:
$ gpg --keyserver keys.gnupg.net --recv 94C09C7F $ gpg --fingerprint 94C09C7F
should show you:
pub 1024D/94C09C7F 1999-11-10
Key fingerprint = 5B00 C96D 5D54 AEE1 206B AF84 DE7A AF6E 94C0 9C7F
uid [ultimate] Peter Palfrader
[...]Then issue
$ gpg --export 94C09C7F | sudo apt-key add -
to add the key to apt's keyring.
Experimental versions of tor
Packages for the development version of Tor are available as well. To install these, add the following lines to /etc/apt/sources.list :
deb http://mirror.noreply.org/pub/tor experimental-0.2.1.x-<DISTRIBUTION> main deb-src http://mirror.noreply.org/pub/tor experimental-0.2.1.x-<DISTRIBUTION> main
where <DISTRIBUTION> should be replaced with either etch, lenny, or sid, or dapper, gutsy, hardy, intrepid, or jaunty.
Note: you should also add the corresponding non-experimental line to your sources.list if you use one of the experimental lines. So that when the package is no longer experimental and has moved to the normal tree you still get updates.
So for etch you would add:
deb http://mirror.noreply.org/pub/tor etch main deb-src http://mirror.noreply.org/pub/tor etch main deb http://mirror.noreply.org/pub/tor experimental-0.2.1.x-etch main deb-src http://mirror.noreply.org/pub/tor experimental-0.2.1.x-etch main
Currently those sources have binaries for the i386 and amd64 architectures.
Building from source
Packages for other architectures can be built from the sources above quite easily.
First get the essentials,
Add an appropriate deb-src line to your /etc/apt/sources.list file - see above.
- sudo apt-get install build-essential fakeroot devscripts
- mkdir ~/debian-packages; cd ~/debian-packages
And then compile Tor
- sudo apt-get build-dep tor
- apt-get source tor
- cd tor-*
- debuild -rfakeroot -uc -us
- cd ..
- dpkg -i tor_*.deb
A guide to chrooting is available in the Wiki.