Browse code

Merge branch 'docs-debian-ubuntu'

hiro authored on27/08/2018 12:47:04
Showing1 changed files
... ...
@@ -15,34 +15,34 @@
15 15
   </div>
16 16
   <div id="maincol">
17 17
 <a id="debian"></a>
18
-<h2><a class="anchor" href="#debian">Option one: Tor on Debian Stretch - stable,
19
-Debian Buster - testing, or Debian Sid - unstable</a></h2>
18
+<h2><a class="anchor" href="#debian">Option one: Tor on Debian Stretch - 
19
+stable, Debian Buster - testing, or Debian Sid - unstable</a></h2>
20 20
 <br />
21 21
 
22 22
 <p>
23 23
 If you're using Debian, just run as root:
24
-</blockquote><pre>  apt install tor </pre></blockquote>
24
+<blockquote><pre># apt install tor</pre></blockquote>
25 25
 </p>
26 26
 
27
-<p>Debian provides the <a href="https://packages.debian.org/stretch/tor">LTS</a>
27
+<p>Debian provides the
28
+<a href="https://packages.debian.org/stretch/tor">LTS</a>
28 29
 version of Tor. Note that this might not always give you the latest stable
29 30
 Tor version, but you will receive important security fixes. To make sure
30 31
 that you're running the latest stable version of Tor, see option two below.
31 32
 </p>
32 33
 
33 34
 <p>
34
-When Tor is installed and running move on to <a href="<page
35
-docs/tor-doc-unix>#using">step two</a> of the "<a href="<page
36
-docs/tor-doc-unix>">Tor on Linux/Unix</a>" instructions.
35
+When Tor is installed and running move on to 
36
+<a href="<page docs/tor-doc-unix>#using">step two</a> of the
37
+"<a href="<page docs/tor-doc-unix>">Tor on Linux/Unix</a>" instructions.
37 38
 </p>
38 39
 
39 40
 <hr />
40 41
 
41 42
 <a id="ubuntu"></a>
42 43
 <a id="packages"></a>
43
-<h2><a class="anchor" href="#ubuntu">Option two: Tor on Ubuntu or
44
+<h2><a class="anchor" href="#ubuntu">Option two: Tor on Ubuntu or 
44 45
 Debian</a></h2>
45
-<br />
46 46
 
47 47
 <p>
48 48
 <b>Do not use the packages in Ubuntu's universe.</b> In the past they have
... ...
@@ -51,24 +51,58 @@ and security fixes.
51 51
 </p>
52 52
 
53 53
 <p>
54
-<b>Raspbian is not Debian.</b> Tor might run fine on the Raspberry Pi 2 / 3 but not the first generation Pi.
55
-These packages might be confusingly broken for Raspbian users, since Raspbian called their architecture armhf but
56
-Debian already has an armhf. See <a
54
+<b>Raspbian is not Debian.</b> Tor might run fine on the Raspberry Pi 2 / 3
55
+but not the first generation Pi.
56
+These packages might be confusingly broken for Raspbian users, since Raspbian 
57
+called their architecture armhf but Debian already has an armhf. See <a
57 58
 href="http://tor.stackexchange.com/questions/242/how-to-run-tor-on-raspbian-on-the-raspberry-pi">this
58 59
 post</a> for details.
59 60
 </p>
60 61
 
61 62
 <p>
62
-You'll need to set up our package repository before you can fetch
63
-Tor. First, you need to figure out the name of your distribution. A
64
-quick command to run is <tt>lsb_release -c</tt> or <tt>cat /etc/debian_version</tt>.
65
-If in doubt about your Debian version, check <a href="https://www.debian.org/releases/">the Debian website</a>.
66
-For Ubuntu, ask <a href="https://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Table_of_versions">Wikipedia</a>.
63
+<b>Admin access</b>:
64
+To install Tor you need root privileges. Below all commands that need to be run
65
+as root user like apt and dpkg are prepended with '&num;',
66
+while commands to be run as user with '$' resembling the standard
67
+prompt in a terminal. To open a root terminal you have several options:
68
+<code>sudo su</code>, or <code>sudo -i</code>,  or <code>su -i</code>.
69
+Note that sudo asks for your user password, while su expects
70
+the root password of your system.
71
+</p>
72
+
73
+<p>
74
+<b>GPG</b>:
75
+<a href="https://gnupg.org/">GNU Privacy Guard</a> version 2.1 is needed for
76
+this guide. If you are using an older version, consider upgrading to gnupg2
77
+or replace 'gpg2' below with <code>gpg --keyserver hkp://pool.sks-keyservers.net</code>
78
+since the keyserver option was mandatory for older versions.
79
+</p>
80
+
81
+<p>
82
+<b>apt-transport-tor</b>:
83
+To use source lines with <tt>https://</tt> in <i>/etc/apt/sources.list</i> the
84
+<a href="https://packages.debian.org/stretch/apt-transport-https">apt-transport-https package</a>
85
+is required. Install it with
86
+<blockquote><pre>
87
+&num; apt install apt-transport-https
88
+</pre></blockquote>
89
+to enable all package managers using the libapt-pkg library to access metadata
90
+and packages available in sources accessible over https (Hypertext Transfer Protocol Secure).
91
+</p>
92
+
93
+<p>
94
+<b>sources.list</b>:
95
+You'll need to set up our package repository before you can fetch Tor. First,
96
+you need to figure out the name of your distribution. A quick command to run is
97
+<tt>lsb_release -c</tt> or <tt>cat /etc/debian_version</tt>.
98
+If in doubt about your Debian version, check
99
+<a href="https://www.debian.org/releases/">the Debian website</a>.
100
+For Ubuntu, ask
101
+<a href="https://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Table_of_versions">Wikipedia</a>.
67 102
 </p>
68 103
 
69 104
 <div id="selector" style="display: none;">
70
-<blockquote>
71
-I run
105
+<blockquote>I run
72 106
 <select id="distrib">
73 107
 <option value="jessie">Debian oldstable (jessie)</option>
74 108
 <option value="stretch" selected="selected">Debian stable (stretch)</option>
... ...
@@ -78,51 +112,42 @@ I run
78 112
 <option value="xenial">Ubuntu Xenial Xerus (16.04 LTS)</option>
79 113
 <option value="artful">Ubuntu Artful Aardvark (17.10)</option>
80 114
 <option value="bionic">Ubuntu Bionic Beaver (18.04 LTS)</option>
115
+<option value="cosmic">Ubuntu Cosmic Cuttlefish (18.10)</option>
81 116
 </select>
82 117
 and want
83 118
 <select id="package"></select>
84
-version
85 119
 <select id="version"></select>
86 120
 </blockquote>
87 121
 
88
-
89 122
 <div id="apt-source">
90
-<p>You need to add the following entries to <code>/etc/apt/sources.list</code> or a new file in
91
-<code>/etc/apt/sources.list.d/</code>:</p>
123
+<p>
124
+You need to add the following entries to <code>/etc/apt/sources.list</code>
125
+or a new file in <code>/etc/apt/sources.list.d/</code>:
126
+</p>
92 127
 
93
-<blockquote><pre id="sources">deb https://deb.torproject.org/torproject.org jessie main
128
+<blockquote><pre id="sources">
129
+deb https://deb.torproject.org/torproject.org jessie main
94 130
 </pre></blockquote>
95 131
 </div>
96 132
 
97
-<p>Note: To use source lines with https:// in <i>/etc/apt/sources.list</i> the <a
98
-href="https://packages.debian.org/stretch/apt-transport-https">apt-transport-https
99
-package</a> is required. Install it with
100
-<blockquote><pre>
101
-apt install apt-transport-https
102
-</pre></blockquote>
103
-to enable the usage of 'deb https://foo distro main' lines in the /etc/apt/sources.list so that all package managers using the libapt-pkg library can access metadata and packages available in sources accessible over https (Hypertext Transfer Protocol Secure).</p>
104
-
105
-<p>To use Apt with Tor later replace <tt>https://</tt> with <tt>tor://</tt> and run
106
-<blockquote><pre>
107
-apt install apt-transport-tor
108
-</pre></blockquote>
109
-</p>
110
-
111 133
 <div id="sig">
112
-<p>Then add the gpg key used to sign the packages by running the following commands at your command prompt:</p>
134
+<p>Then add the gpg key used to sign the packages by running the following
135
+commands at your command prompt:
113 136
 <blockquote><pre>
114
-gpg --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
115
-gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
116
-</pre></blockquote>
137
+&num; gpg2 --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
138
+&num; gpg2 --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
139
+</pre></blockquote></p>
117 140
 </div>
118 141
 
119
-
120 142
 <div id="apt-get">
121
-<p>You can install it with the following commands:</p>
122
-<blockquote><pre>apt update
123
-<span id="regular-install">apt install <span id="apt-package">tor</span> deb.torproject.org-keyring</span>
124
-<span id="source-install">$ apt install build-essential fakeroot devscripts
125
-$ apt build-dep tor deb.torproject.org-keyring</span></pre></blockquote>
143
+<p>We provide a Debian package to help you keep our signing key current. It is
144
+recommended you use it. Install it with the following commands:</p>
145
+<blockquote><pre>&num; apt update
146
+<span id="regular-install">&num; apt install <span id="apt-package">tor</span> deb.torproject.org-keyring</span>
147
+<span id="source-install">&num; apt install build-essential fakeroot devscripts
148
+&num; apt build-dep tor deb.torproject.org-keyring
149
+</span>
150
+</pre></blockquote>
126 151
 
127 152
 <div id="source-install2">
128 153
 <p>Then you can build Tor in ~/debian-packages:</p>
... ...
@@ -135,7 +160,7 @@ $ cd ..
135 160
 </pre></blockquote>
136 161
 <p>Now you can install the new package:</p>
137 162
 <blockquote><pre>
138
-$ sudo dpkg -i tor_*.deb
163
+&num; dpkg -i tor_*.deb
139 164
 </pre></blockquote>
140 165
 </div>
141 166
 </div>
... ...
@@ -143,140 +168,155 @@ $ sudo dpkg -i tor_*.deb
143 168
 
144 169
 <noscript>
145 170
 <p>
146
-Then add this line to your
147
-<tt>/etc/apt/sources.list</tt>
148
-file:<br />
149
-<pre style="margin: 1.5em 0 1.5em 2em">
171
+Then add this line to your <tt>/etc/apt/sources.list</tt> file:<br />
172
+<blockquote><pre>
150 173
 deb     https://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main
151
-</pre>
174
+</pre></blockquote>
152 175
 where you put the codename of your distribution (i.e. stretch, buster, sid
153
-or whatever it is)
154
-in place of &lt;DISTRIBUTION&gt;.
176
+or whatever it is) in place of &lt;DISTRIBUTION&gt;.
155 177
 </p>
156 178
 
157 179
 <p>
158
-If you want to use the <a href="<page download/download-unix>#packagediff">development branch</a> of Tor instead (more features and more bugs), you need add a different set of lines to your <i>/etc/apt/sources.list</i> file:<br />
159
-<pre style="margin: 1.5em 0 1.5em 2em">
180
+If you want to use the
181
+<a href="<page download/download-unix>#packagediff">development branch</a>
182
+of Tor instead (more features and more bugs), you need add a different set of
183
+lines to your <i>/etc/apt/sources.list</i> file:<br />
184
+<blockquote><pre>
160 185
 deb     https://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main
161 186
 deb     https://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-&lt;DISTRIBUTION&gt; main
162
-</pre>
163
-</p>
164
-
165
-<p>Note: To use source lines with <tt>https://</tt> in <i>/etc/apt/sources.list</i> the <a
166
-href="https://packages.debian.org/stretch/apt-transport-https">apt-transport-https
167
-package</a> is required. Install it with
168
-<blockquote><pre>
169
-apt install apt-transport-https
170
-</pre></blockquote>
171
-to enable the usage of 'deb https://foo distro main' lines in the /etc/apt/sources.list so that all package managers using the libapt-pkg library can access metadata and packages available in sources accessible over https (Hypertext Transfer Protocol Secure).</p>
172
-
173
-<p>To use Apt with Tor later replace <tt>https://</tt> with <tt>tor://</tt> and run <blockquote><pre>
174
-apt install apt-transport-tor
175 187
 </pre></blockquote>
176 188
 </p>
177 189
 
178 190
 <p>
179 191
 Then add the gpg key used to sign the packages by running the following
180 192
 commands at your command prompt:
181
-<pre style="margin: 1.5em 0 1.5em 2em">
182
-gpg --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
183
-gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
184
-</pre>
193
+<blockquote><pre>
194
+&num; gpg2 --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
195
+&num; gpg2 --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
196
+</pre></blockquote>
185 197
 Now refresh your sources, running the following command (as root) at your
186 198
 command prompt:
187
-<pre style="margin: 1.5em 0 1.5em 2em">
188
-apt update
189
-</pre>
199
+<blockquote><pre>
200
+&num; apt update
201
+</pre></blockquote>
190 202
 If there are no errors you're good to continue.
191 203
 </p>
192 204
 
193 205
 <p>
194
-We provide a Debian package to help you keep our signing key current.  It is
195
-recommended you use it.  Install it along with tor using
196
-<pre style="margin: 1.5em 0 1.5em 2em">
197
-apt install tor deb.torproject.org-keyring
198
-</pre>
206
+We provide a Debian package to help you keep our signing key current. It is
207
+recommended you use it. Install it together with tor:
208
+<blockquote><pre>
209
+&num; apt install tor deb.torproject.org-keyring
210
+</pre></blockquote>
199 211
 </p>
200 212
 
201 213
 </noscript>
202
-
203
-<p>
204
-Now Tor is installed and running. Move on to <a href="<page
205
-docs/tor-doc-unix>#using">step two</a> of the "Tor on Linux/Unix"
206
-instructions.
207
-</p>
208
-
209
-<p style="font-size: small">
210
-The DNS name <code>deb.torproject.org</code> is actually a set of independent
211
-servers in a DNS round robin configuration.  If you for some reason cannot
212
-access it you might try to use the name of one of its part instead.  Try
213
-<code>deb-master.torproject.org</code>,
214
-<code>mirror.netcologne.de</code> or
215
-<code>tor.mirror.youam.de</code>.
216
-</p>
217
-
218
-<p><code>deb.torproject.org</code> is also served through now also served via onion service:
219
-<a href="http://sdscoq7snqtznauu.onion">http://sdscoq7snqtznauu.onion/</a> To use the onion service with apt, replace the address in the previously added lines:
220
-<pre style="margin: 1.5em 0 1.5em 2em">.
221
-# For the stable version.
222
-deb tor://sdscoq7snqtznauu.onion/torproject.org buster main
223
-
224
-# For the unstable version.
225
-deb tor://sdscoq7snqtznauu.onion/torproject.org tor-nightly-master-&lt;DISTRIBUTION&gt; main
226
-</pre>
227
-<br />
228
-See <a href="https://onion.torproject.org/">https://onion.torproject.org</a> for all
229
-torproject.org onion addresses.</p>
230
-
231 214
 <noscript>
232 215
 
233 216
 <hr />
234 217
 
235 218
 <a id="source"></a>
236 219
 <h2><a class="anchor" href="#source">Building from source</a></h2>
237
-<br />
238 220
 
239 221
 <p>
240 222
 If you want to build your own debs from source you must first add an
241 223
 appropriate <tt>deb-src</tt> line to <tt>sources.list</tt>.
242
-<pre style="margin: 1.5em 0 1.5em 2em">
243
-# For the stable version.
224
+</p>
225
+<blockquote><pre>
226
+&num; For the stable version.
244 227
 deb-src https://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main
245 228
 
246
-# For the unstable version.
229
+&num; For the unstable version.
247 230
 deb-src https://deb.torproject.org/torproject.org &lt;DISTRIBUTION&gt; main
248 231
 deb-src https://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-&lt;DISTRIBUTION&gt; main
249
-</pre>
250
-Substitute the name of your distro (stretch, buster, sid, xenial, ...) in place of &lt;DISTRIBUTION&gt;. Now refresh your sources by running (as root):
251
-<pre style="margin: 1.5em 0 1.5em 2em">
252
-apt update
253
-</pre>
232
+</pre></blockquote>
233
+<p>
234
+Substitute the name of your distro (stretch, buster, sid, xenial, ...) in
235
+place of &lt;DISTRIBUTION&gt;. Now refresh your sources by running (as root):
236
+</p>
237
+<blockquote><pre>
238
+&num; apt update
239
+</pre></blockquote>
240
+<p>
254 241
 You also need to install the necessary packages to build your own debs and the
255 242
 packages needed to build Tor:
256
-<pre style="margin: 1.5em 0 1.5em 2em">
257
-apt install build-essential fakeroot devscripts
258
-apt build-dep tor
259
-</pre>
243
+</p>
244
+<blockquote><pre>
245
+&num; apt install build-essential fakeroot devscripts
246
+&num; apt build-dep tor
247
+</pre></blockquote>
248
+<p>
260 249
 Then you can build Tor in ~/debian-packages:
261
-<pre style="margin: 1.5em 0 1.5em 2em">
262
-mkdir ~/debian-packages; cd ~/debian-packages
263
-apt source tor
264
-cd tor-*
265
-debuild -rfakeroot -uc -us
266
-cd ..
267
-</pre>
250
+</p>
251
+<blockquote><pre>
252
+$ mkdir ~/debian-packages; cd ~/debian-packages
253
+$ apt source tor
254
+$ cd tor-*
255
+$ debuild -rfakeroot -uc -us
256
+$ cd ..
257
+</pre></blockquote>
258
+<p>
268 259
 Now you can install the new package:
269
-<pre style="margin: 1.5em 0 1.5em 2em">
270
-sudo dpkg -i tor_*.deb
271
-</pre>
272 260
 </p>
261
+<blockquote><pre>
262
+&num; dpkg -i tor_*.deb
263
+</pre></blockquote>
264
+
265
+</noscript>
273 266
 
274 267
 <p>
275
-Now Tor is installed and running. Move on to <a href="<page
276
-docs/tor-doc-unix>#using">step two</a> of the "Tor on Linux/Unix"
277
-instructions.
268
+Now Tor is installed and running. Move on to
269
+<a href="<page docs/tor-doc-unix>#using">step two</a> of the
270
+"Tor on Linux/Unix" instructions.
271
+</p>
272
+
273
+<p style="font-size: small">
274
+The DNS name <code>deb.torproject.org</code> is actually a set of independent
275
+servers in a DNS round robin configuration. If you for some reason cannot
276
+access it you might try to use the name of one of its part instead. Try
277
+<code>deb-master.torproject.org</code>,
278
+<code>mirror.netcologne.de</code> or
279
+<code>tor.mirror.youam.de</code>.
280
+</p>
281
+
282
+<hr />
283
+
284
+<a id="apt-over-tor"></a>
285
+<h2><a class="anchor" href="#apt-over-tor">Use Apt over Tor</a></h2>
286
+
287
+<p>
288
+<code>deb.torproject.org</code> is also served through via an onion service:
289
+<a href="http://sdscoq7snqtznauu.onion">http://sdscoq7snqtznauu.onion/</a>
290
+</p>
291
+
292
+<p>
293
+To use Apt with Tor the according apt transport needs to be installed:
294
+</p>
295
+<blockquote><pre>
296
+&num; apt install apt-transport-tor
297
+</pre></blockquote>
298
+
299
+<p>
300
+Then replace the address in the lines added before with, for example:
301
+</p>
302
+<blockquote><pre>
303
+&num; For the stable version.
304
+deb tor://sdscoq7snqtznauu.onion/torproject.org &lt;DISTRIBUTION&gt; main
305
+
306
+&num; For the unstable version.
307
+deb tor://sdscoq7snqtznauu.onion/torproject.org tor-nightly-master-&lt;DISTRIBUTION&gt; main
308
+</pre></blockquote>
309
+<p>
310
+Now refresh your sources and try if it's still possible to install tor:
311
+</p>
312
+<blockquote><pre>
313
+&num; apt update
314
+&num; apt install tor
315
+</pre></blockquote>
316
+<p>
317
+See <a href="https://onion.torproject.org/">onion.torproject.org</a>
318
+for all torproject.org onion addresses.</p>
278 319
 </p>
279
-</noscript>
280 320
 
281 321
 <!-- END MAIN COL -->
282 322
   </div>