Option one: Tor on Debian squeeze, Debian sid, or Debian testing


Если Вы используете Debian, просто выполненный

apt-get install tor as root.



Option two: Tor on Ubuntu or Debian


Do not use the packages in Ubuntu's universe. In the past they have not reliably been updated. That means you could be missing stability and security fixes.
Raspbian is not Debian. These packages will be confusingly broken for Raspbian users, since Raspbian called their architecture armhf but Debian already has an armhf. See this post for details.
You'll need to set up our package repository before you can fetch Tor. First, you need to figure out the name of your distribution. A quick command to run is lsb_release -c or cat /etc/debian_version. If in doubt about your Debian version, check the Debian website. For Ubuntu, ask Wikipedia. Then add this line to your /etc/apt/sources.list file:

deb     http://deb.torproject.org/torproject.org <DISTRIBUTION> main
where you put the codename of your distribution (i.e. lenny, sid, saucy or whatever it is) in place of <DISTRIBUTION>. Then add the gpg key used to sign the packages by running the following commands at your command prompt:
gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
Now refresh your sources, running the following command (as root) at your command prompt:
apt-get update
If there are no errors you're good to continue. We provide a Debian package to help you keep our signing key current. It is recommended you use it. Install it using
apt-get install deb.torproject.org-keyring
To finally install Tor just run:
apt-get install tor
Now Tor is installed and running. Move on to step two of the "Tor on Linux/Unix" instructions.
The DNS name deb.torproject.org is actually a set of independent servers in a DNS round robin configuration. If you for some reason cannot access it you might try to use the name of one of its part instead. Try deb-master.torproject.org, mirror.netcologne.de or tor.mirror.youam.de.

Option three: Using the development branch of Tor on Debian or Ubuntu


If you want to use the development branch of Tor instead (more features and more bugs), you need to add a different set of lines to your /etc/apt/sources.list file:

deb     http://deb.torproject.org/torproject.org <DISTRIBUTION> main
deb     http://deb.torproject.org/torproject.org tor-experimental-0.2.5.x-<DISTRIBUTION> main
where you again substitute the name of your distro (lenny, sid, saucy, ...) in place of <DISTRIBUTION>. Then run the following commands at your command prompt:
gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
apt-get update
apt-get install tor deb.torproject.org-keyring
Now Tor is installed and running. Move on to step two of the "Tor on Linux/Unix" instructions.

Building from source


If you want to build your own debs from source you must first add an appropriate deb-src line to sources.list.
deb-src http://deb.torproject.org/torproject.org <DISTRIBUTION> main

deb-src http://deb.torproject.org/torproject.org <DISTRIBUTION> main
deb-src http://deb.torproject.org/torproject.org tor-experimental-0.2.5.x-<DISTRIBUTION> main
You also need to install the necessary packages to build your own debs and the packages needed to build Tor:
apt-get install build-essential fakeroot devscripts
apt-get build-dep tor
Then you can build Tor in ~/debian-packages:
mkdir ~/debian-packages; cd ~/debian-packages
apt-get source tor
cd tor-*
debuild -rfakeroot -uc -us
cd ..
Now you can install the new package:
sudo dpkg -i tor_*.deb
Now Tor is installed and running. Move on to step two of the "Tor on Linux/Unix" instructions.