summaryrefslogtreecommitdiff
path: root/docs/en/debian.wml
blob: 5cbe323ade2819a6fe29e63abc3b17e9c1e01af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
## translation metadata
# Revision: $Revision$
# Translation-Priority: 3-low

#include "head.wmi" TITLE="Tor Project: Debian/Ubuntu Instructions" CHARSET="UTF-8"
{#meta#:
<script type="text/javascript" src="debian-selector.js"></script>
:#meta#}

<div id="content" class="clearfix">
  <div id="breadcrumbs">
    <a href="<page index>">Home &raquo; </a>
    <a href="<page docs/documentation>">Documentation &raquo; </a>
    <a href="<page docs/debian>">Debian/Ubuntu Instructions</a>
  </div>
  <div id="maincol">
<a id="debian"></a>
<h2><a class="anchor" href="#debian">Option one: Tor on Debian Stretch - stable,
Debian Buster - testing, or Debian Sid - unstable</a></h2>
<br />

<p>
If you're using Debian, just run
</blockquote><pre>  apt-get install tor </pre></blockquote>
as root.
</p>

<p>
Note that this might not always give you the latest stable Tor version, but
you will receive important security fixes. To make sure that you're running
the latest stable version of Tor, see option two below.
</p>

<p>
Now Tor is installed and running. Move on to <a href="<page
docs/tor-doc-unix>#using">step two</a> of the "Tor on Linux/Unix"
instructions.
</p>

<hr />

<a id="ubuntu"></a>
<a id="packages"></a>
<h2><a class="anchor" href="#ubuntu">Option two: Tor on Ubuntu or
Debian</a></h2>
<br />

<p>
<b>Do not use the packages in Ubuntu's universe.</b> In the past they have
not reliably been updated. That means you could be missing stability
and security fixes.
</p>

<p>
<b>Raspbian is not Debian.</b> These packages will be confusingly broken
for Raspbian users, since Raspbian called their architecture armhf but
Debian already has an armhf. See <a
href="http://tor.stackexchange.com/questions/242/how-to-run-tor-on-raspbian-on-the-raspberry-pi">this
post</a> for details.
</p>

<p>
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 <tt>lsb_release -c</tt> or <tt>cat /etc/debian_version</tt>.
If in doubt about your Debian version, check <a href="http://www.debian.org/releases/">the Debian website</a>.
For Ubuntu, ask <a href="https://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Table_of_versions">Wikipedia</a>.
</p>

<div id="selector" style="display: none;">
<blockquote>
I run
<select id="distrib">
<option value="wheezy">Debian oldstable (jessie)</option>
<option value="jessie" selected="selected">Debian stable (stretch)</option>
<option value="stretch">Debian testing (buster)</option>
<option value="sid">Debian unstable (sid)</option>
<option value="precise">Ubuntu Precise Pangolin</option>
<option value="trusty">Ubuntu Trusty Tahr</option>
<option value="xenial">Ubuntu Xenial Xerus</option>
</select>
and want
<select id="package"></select>
version
<select id="version"></select>
</blockquote>


<div id="apt-source">
<p>You need to add the following entry in <code>/etc/apt/sources.list</code> or a new file in <code>/etc/apt/sources.list.d/</code>:</p>

<blockquote><pre id="sources">deb http://deb.torproject.org/torproject.org wheezy main
</pre></blockquote>
</div>

<div id="sig">
<p>Then add the gpg key used to sign the packages by running the following commands at your command prompt:</p>
<blockquote><pre>
gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
</pre></blockquote>
</div>


<div id="apt-get">
<p>You can install it with the following commands:</p>
<blockquote><pre>$ apt-get update
<span id="regular-install">$ apt-get install <span id="apt-package">tor</span> deb.torproject.org-keyring</span>
<span id="source-install">$ apt-get install build-essential fakeroot devscripts
$ apt-get build-dep tor deb.torproject.org-keyring</span></pre></blockquote>

<div id="source-install2">
<p>
Then you can build Tor in ~/debian-packages:
</p>
<blockquote><pre>
$ mkdir ~/debian-packages; cd ~/debian-packages
$ apt-get source tor
$ cd tor-*
$ debuild -rfakeroot -uc -us
$ cd ..
</pre></blockquote>
<p>Now you can install the new package:</p>
<blockquote><pre>
$ sudo dpkg -i tor_*.deb
</pre></blockquote>
</div>
</div>
</div>

<noscript>
<p>
Then add this line to your
<tt>/etc/apt/sources.list</tt>
file:<br />
<pre style="margin: 1.5em 0 1.5em 2em">
deb     http://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main
</pre>
where you put the codename of your distribution (i.e. lenny, sid,
saucy or whatever it is)
in place of &lt;DISTRIBUTION&gt;.
</p>

<p>
Then add the gpg key used to sign the packages by running the following
commands at your command prompt:
<pre style="margin: 1.5em 0 1.5em 2em">
gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
</pre>
Now refresh your sources, running the following command (as root) at your
command prompt:
<pre style="margin: 1.5em 0 1.5em 2em">
apt-get update
</pre>
If there are no errors you're good to continue.
</p>

<p>
We provide a Debian package to help you keep our signing key current.  It is
recommended you use it.  Install it using
<pre style="margin: 1.5em 0 1.5em 2em">
apt-get install deb.torproject.org-keyring
</pre>
</p>

<p>
To finally install Tor just run:
<pre style="margin: 1.5em 0 1.5em 2em">
apt-get install tor
</pre>
</p>

</noscript>

<p>
Now Tor is installed and running. Move on to <a href="<page
docs/tor-doc-unix>#using">step two</a> of the "Tor on Linux/Unix"
instructions.
</p>

<noscript>
<p style="font-size: small">
The DNS name <code>deb.torproject.org</code> 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
<code>deb-master.torproject.org</code>,
<code>mirror.netcologne.de</code> or
<code>tor.mirror.youam.de</code>.
</p>

<hr />

<a id="development"></a>
<h2><a class="anchor" href="#development">Option three: Using the
development branch of Tor on Debian or Ubuntu</a></h2>
<br />

<p>If you want to use the <a href="<page
download/download>#packagediff">development branch</a> of Tor instead
(more features and more bugs), you need to add a different set of lines
to your <tt>/etc/apt/sources.list</tt> file:<br />
<pre style="margin: 1.5em 0 1.5em 2em">
deb     http://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main
deb     http://deb.torproject.org/torproject.org tor-experimental-0.3.0.x-&lt;DISTRIBUTION&gt; main
</pre>
where you again substitute the name of your distro (lenny,
sid, saucy, ...) in place of
&lt;DISTRIBUTION&gt;.
</p>

<p>
Then run the following commands at your command prompt:
<pre style="margin: 1.5em 0 1.5em 2em">
gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
apt-get update
apt-get install tor deb.torproject.org-keyring
</pre>
</p>

<p>
Now Tor is installed and running. Move on to <a href="<page
docs/tor-doc-unix>#using">step two</a> of the "Tor on Linux/Unix"
instructions.
</p>

<hr />

<a id="source"></a>
<h2><a class="anchor" href="#source">Building from source</a></h2>
<br />

<p>
If you want to build your own debs from source you must first add an
appropriate <tt>deb-src</tt> line to <tt>sources.list</tt>.
<pre style="margin: 1.5em 0 1.5em 2em">
# For the stable version.
deb-src http://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main

# For the unstable version.
deb-src http://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main
deb-src http://deb.torproject.org/torproject.org tor-experimental-0.3.0.x-&lt;DISTRIBUTION&gt; main
</pre>
Substitute the name of your distro (wheezy, sid, trusty, ...) in place of &lt;DISTRIBUTION&gt;. Now refresh your sources by running (as root):
<pre style="margin: 1.5em 0 1.5em 2em">
apt-get update
</pre>
You also need to install the necessary packages to build your own debs and the
packages needed to build Tor:
<pre style="margin: 1.5em 0 1.5em 2em">
apt-get install build-essential fakeroot devscripts
apt-get build-dep tor
</pre>
Then you can build Tor in ~/debian-packages:
<pre style="margin: 1.5em 0 1.5em 2em">
mkdir ~/debian-packages; cd ~/debian-packages
apt-get source tor
cd tor-*
debuild -rfakeroot -uc -us
cd ..
</pre>
Now you can install the new package:
<pre style="margin: 1.5em 0 1.5em 2em">
sudo dpkg -i tor_*.deb
</pre>
</p>

<p>
Now Tor is installed and running. Move on to <a href="<page
docs/tor-doc-unix>#using">step two</a> of the "Tor on Linux/Unix"
instructions.
</p>
</noscript>

<!-- END MAIN COL -->
  </div>
  <div id = "sidecol">
#include "side.wmi"
#include "info.wmi"
  </div>
  <!-- END SIDECOL -->
</div>
<!-- END CONTENT -->
#include <foot.wmi>