Browse Source

Minor updates, less "note that" wording

biotorrents 4 years ago
parent
commit
02ca03b707
1 changed files with 33 additions and 41 deletions
  1. 33
    41
      docs/install.md

+ 33
- 41
docs/install.md View File

1
 # Install
1
 # Install
2
 
2
 
3
 Thanks for your interest in BioTorrents.de's development!
3
 Thanks for your interest in BioTorrents.de's development!
4
-Gazelle is notoriously difficult to install and good docs are lacking.
5
-This page, based on the
4
+Gazelle is notoriously difficult to install.
6
 [original announcement protocol](https://github.com/biotorrents/announcement),
5
 [original announcement protocol](https://github.com/biotorrents/announcement),
7
-is an attempt to make an evergreen install guide.
8
-It's fast paced and only covers the essentials.
6
+is an attempt at an evergreen install guide.
9
 
7
 
10
 # Debian system profile
8
 # Debian system profile
11
 
9
 
60
 # reboot
58
 # reboot
61
 ```
59
 ```
62
 
60
 
63
-Further server setup,
64
-including TLD considerations, DNS, email, etc.,
65
-are beyond this guide's scope.
61
+Further server setup, including DNS, email, etc., are beyond this guide's scope.
66
 For more info about SSH, Unbound, NSD, OpenSMTPd, Dovecot, Unix users, etc.,
62
 For more info about SSH, Unbound, NSD, OpenSMTPd, Dovecot, Unix users, etc.,
67
 [please see the original launch announcement](https://github.com/biotorrents/announcement).
63
 [please see the original launch announcement](https://github.com/biotorrents/announcement).
68
 
64
 
71
 Install Nginx and Certbot with `apt install nginx certbot python3-certbot-nginx`.
67
 Install Nginx and Certbot with `apt install nginx certbot python3-certbot-nginx`.
72
 
68
 
73
 The basic Gazelle Nginx config should look similar to this.
69
 The basic Gazelle Nginx config should look similar to this.
74
-Note that you'll likely have to change the file paths based on your setup.
75
-Also, PHP-FPM may need larger-than-default buffers to serve without 502 errors:
70
+You'll likely have to change the file paths based on your setup.
71
+Also, PHP-FPM may need larger buffers to serve without 502 errors:
76
 
72
 
77
 ```nginx
73
 ```nginx
78
 server {
74
 server {
127
 ```
123
 ```
128
 
124
 
129
 The Nginx config for the Ocelot tracker should look like this.
125
 The Nginx config for the Ocelot tracker should look like this.
130
-Nginx acts as a TLS reverse proxy so that Ocelot isn't directly exposed.
131
-Note the additional caveats of Ocelot's listening port (34000 is default),
132
-and setting the correct `Host` header (so tracker connections don't show up as localhost):
126
+Nginx acts as a TLS reverse proxy so Ocelot isn't directly exposed.
127
+Note the `Host` header (so tracker connections don't show up as localhost):
133
 
128
 
134
 ```nginx
129
 ```nginx
135
 server {
130
 server {
163
 
158
 
164
 Please see the
159
 Please see the
165
 [Certbot docs](https://certbot.eff.org/docs/using.html)
160
 [Certbot docs](https://certbot.eff.org/docs/using.html)
166
-for more info.
167
-Also see the
161
+and
168
 [OWASP Secure Headers Project](https://owasp.org/www-project-secure-headers/)
162
 [OWASP Secure Headers Project](https://owasp.org/www-project-secure-headers/)
169
-for info on proper Nginx security.
163
+for more info.
170
 
164
 
171
 ## MariaDB
165
 ## MariaDB
172
 
166
 
173
 Install MariaDB with `apt install mariadb-server`
167
 Install MariaDB with `apt install mariadb-server`
174
 and initialize it with `mysql_secure_installation`.
168
 and initialize it with `mysql_secure_installation`.
175
 
169
 
176
-Note that BioTorrents.de uses TLS connections to a dedicated database server.
170
+BioTorrents.de uses TLS connections to a dedicated database server.
177
 Unix sockets are preferred for the database running on localhost.
171
 Unix sockets are preferred for the database running on localhost.
178
 The config should look similar to this, paying attention to `sql-mode`:
172
 The config should look similar to this, paying attention to `sql-mode`:
179
 
173
 
210
 They contain the necessary info to generate self-signed certs.
204
 They contain the necessary info to generate self-signed certs.
211
 
205
 
212
 Finally, load the Gazelle database schema in an SQL shell.
206
 Finally, load the Gazelle database schema in an SQL shell.
213
-I prefer to generate secure passphrases with `pwgen -s | encrypt`.
207
+I generate secure passphrases with `pwgen -s | encrypt`:
214
 
208
 
215
 ```mysql
209
 ```mysql
216
 CREATE DATABASE gazelle_development;
210
 CREATE DATABASE gazelle_development;
227
 `apt install php php-dev php-fpm`.
221
 `apt install php php-dev php-fpm`.
228
 
222
 
229
 The PHP extensions.
223
 The PHP extensions.
230
-Note that there are two PHP memcached extensions.
224
+There are two PHP memcached extensions.
231
 The correct one is just `php-memcache` without the "d."
225
 The correct one is just `php-memcache` without the "d."
232
 Your distro may require other extensions:
226
 Your distro may require other extensions:
233
 `php-apcu php-mbstring php-memcache php-mysql`.
227
 `php-apcu php-mbstring php-memcache php-mysql`.
234
 
228
 
235
 BioTorrents.de also supports the
229
 BioTorrents.de also supports the
236
 [Seqhash algorithm](https://blog.libredna.org/post/seqhash/)
230
 [Seqhash algorithm](https://blog.libredna.org/post/seqhash/)
237
-and requires Blake3 hash support for this feature.
231
+and requires Blake3 for this feature.
238
 Optionally, please install
232
 Optionally, please install
239
 [php-blake3](https://github.com/cypherbits/php-blake3).
233
 [php-blake3](https://github.com/cypherbits/php-blake3).
240
 
234
 
248
 Install memcached with `apt install memcached`.
242
 Install memcached with `apt install memcached`.
249
 
243
 
250
 BioTorrents.de supports separate production and development instances.
244
 BioTorrents.de supports separate production and development instances.
251
-If you with to run two instances, it's necessary to run two memcached sockets.
252
-Otherwise the sites will experience significant data cross-contamination.
253
-The required `/etc/memcached.conf` content:
245
+If you with to run two instances, it's necessary to run memcached twice.
246
+Otherwise the sites will experience significant cross-contamination.
247
+The `/etc/memcached.conf` content:
254
 
248
 
255
 ```
249
 ```
256
 -d
250
 -d
265
 A helper script to quickly bring up a second memcached as root:
259
 A helper script to quickly bring up a second memcached as root:
266
 
260
 
267
 ```shell
261
 ```shell
268
-#!/bin/bash
262
+#!/bin/sh
269
 memcached -d -m 5120 -s /var/run/memcached/memcached-dev.sock -a 0777 -t16 -C -u memcache
263
 memcached -d -m 5120 -s /var/run/memcached/memcached-dev.sock -a 0777 -t16 -C -u memcache
270
 ```
264
 ```
271
 
265
 
294
 # Application setup
288
 # Application setup
295
 
289
 
296
 This section should use a separate Unix user for each component.
290
 This section should use a separate Unix user for each component.
297
-Gazelle, Ocelot, IRC, and sitebot should each have a distinct home folder and full shell.
298
-The applications would otherwise be an insecure jumble and hard to maintain.
291
+Gazelle, Ocelot, IRC, and sitebot should each have their own home folder and shell.
292
+Otherwise the applications would be an insecure jumble and hard to maintain.
299
 
293
 
300
 ## Gazelle
294
 ## Gazelle
301
 
295
 
314
 
308
 
315
 ```shell
309
 ```shell
316
 # nginx(8) log location
310
 # nginx(8) log location
317
-mkdir -m 700 -p /var/www/log/{development,production}
318
-touch /var/www/log/production/{peerupdate.log,schedule.log}
319
-touch /var/www/log/development/{peerupdate.log,schedule.log}
311
+mkdir -m 700 -p /var/www/log/{production,development}
312
+touch /var/www/log/{production,development/{peerupdate.log,schedule.log}
320
 chown -R biotorrents:biotorrents /var/www/log
313
 chown -R biotorrents:biotorrents /var/www/log
321
 
314
 
322
 # files outside the web root
315
 # files outside the web root
323
-mkdir -m 700 -p /var/www/pictures /var/www/torrents
316
+mkdir -m 700 -p /var/www/pictures /var/www/torrents /var/www/torrents-dev
324
 chown -R www-data:www-data /var/www/pictures /var/www/torrents /var/www/torrents-dev
317
 chown -R www-data:www-data /var/www/pictures /var/www/torrents /var/www/torrents-dev
325
 ```
318
 ```
326
 
319
 
341
 find . -type d -print0 | xargs -0 chmod 0755
334
 find . -type d -print0 | xargs -0 chmod 0755
342
 ```
335
 ```
343
 
336
 
344
-### Gazelle app config
337
+### Application config
345
 
338
 
346
 [`classes/config.php`](https://github.com/biotorrents/gazelle/blob/development/classes/config.template.php)
339
 [`classes/config.php`](https://github.com/biotorrents/gazelle/blob/development/classes/config.template.php)
347
 warrants its own section.
340
 warrants its own section.
348
-When setting up Gazelle for the first time, these options must be enabled.
341
+When setting up Gazelle for the first time, set these options:
349
 
342
 
350
 - `'DEBUG_MODE' = false`
343
 - `'DEBUG_MODE' = false`
351
 - `'OPEN_REGISTRATION' = true`
344
 - `'OPEN_REGISTRATION' = true`
356
 [`$ENV = ENV::go()`](https://github.com/biotorrents/gazelle/blob/development/classes/env.class.php).
349
 [`$ENV = ENV::go()`](https://github.com/biotorrents/gazelle/blob/development/classes/env.class.php).
357
 
350
 
358
 There are some other values to set up.
351
 There are some other values to set up.
359
-Please pay attention to these values that Gazelle needs for proper function:
352
+Please pay attention to these values for proper functionality:
360
 
353
 
361
 - `SITE_DOMAIN` and `IMAGE_DOMAIN`
354
 - `SITE_DOMAIN` and `IMAGE_DOMAIN`
362
 - `WEB_ROOT` and `SERVER_ROOT`
355
 - `WEB_ROOT` and `SERVER_ROOT`
380
 ```
373
 ```
381
 
374
 
382
 Then add `/var/www/bin` to the Gazelle user's `$PATH` and run:
375
 Then add `/var/www/bin` to the Gazelle user's `$PATH` and run:
383
-`php composer.phar update`.
376
+`composer update`.
384
 
377
 
385
 ### SCSS and fonts
378
 ### SCSS and fonts
386
 
379
 
394
 This should be a for loop, to compile the CSS:
387
 This should be a for loop, to compile the CSS:
395
 
388
 
396
 ```shell
389
 ```shell
397
-#!/bin/bash
390
+#!/bin/sh
398
 styles="/var/www/html/dev.biotorrents.de/static/styles"
391
 styles="/var/www/html/dev.biotorrents.de/static/styles"
399
 sassc "$styles/beluga/beluga.scss" > "$styles/beluga.css"
392
 sassc "$styles/beluga/beluga.scss" > "$styles/beluga.css"
400
 sassc "$styles/bookish/bookish.scss" > "$styles/bookish.css"
393
 sassc "$styles/bookish/bookish.scss" > "$styles/bookish.css"
415
 The patched version is available at
408
 The patched version is available at
416
 [biotorrents/ocelot](/biotorrents/ocelot).
409
 [biotorrents/ocelot](/biotorrents/ocelot).
417
 
410
 
418
-Then installed the dependencies like below.
419
-Note that specific dependencies may differ on your system.
411
+First installed the dependencies like below.
412
+The specific dependencies may differ on your system.
420
 
413
 
421
 ```shell
414
 ```shell
422
 apt install \
415
 apt install \
446
 make install
439
 make install
447
 ```
440
 ```
448
 
441
 
449
-Copy `ocelot/ocelot.conf.dist`.
442
+Copy and edit `ocelot/ocelot.conf.dist` to the Ocelot user's home folder.
450
 The daemon runs on `localhost:34000` and Nginx TLS reverse proxies it to `localhost:443`.
443
 The daemon runs on `localhost:34000` and Nginx TLS reverse proxies it to `localhost:443`.
451
-`ocelot.conf` lives in the Ocelot user's home folder and the daemon runs in a tmux window there.
444
+The Ocelot daemon runs in a tmux window under as a user process.
452
 
445
 
453
 ## IRC and kana (sitebot)
446
 ## IRC and kana (sitebot)
454
 
447
 
459
 At this point it should be possible to register for the site.
452
 At this point it should be possible to register for the site.
460
 The first account is the sysop so please act quickly here.
453
 The first account is the sysop so please act quickly here.
461
 Disable `DEBUG_MODE` and `FEATURE_SET_ENC_KEY_PUBLIC` as soon as you register!
454
 Disable `DEBUG_MODE` and `FEATURE_SET_ENC_KEY_PUBLIC` as soon as you register!
462
-Do `apt install qrencode` for 2FA support and enable it with a GPG key on the sysop account.
455
+Then do `apt install qrencode` for 2FA support and enable it with a GPG key on the sysop account.
463
 
456
 
464
 Configure a client whitelist on the Toolbox page by the
457
 Configure a client whitelist on the Toolbox page by the
465
 [BitTorrent spec's peer ID list](https://wiki.theory.org/index.php/BitTorrentSpecification#peer_id).
458
 [BitTorrent spec's peer ID list](https://wiki.theory.org/index.php/BitTorrentSpecification#peer_id).
466
 Please find a list of quality client peer IDs below.
459
 Please find a list of quality client peer IDs below.
467
-Note that LibTorrent 0.1x.y also covers rTorrent/ruTorrent and other clients that use
460
+LibTorrent 0.1x.y also covers rTorrent/ruTorrent and other clients that use
468
 [rakshasa's library](https://github.com/rakshasa/libtorrent):
461
 [rakshasa's library](https://github.com/rakshasa/libtorrent):
469
 
462
 
470
 | Client Name       | Peer ID |
463
 | Client Name       | Peer ID |
481
 | Transmission 2.xy | `-TR2`  |
474
 | Transmission 2.xy | `-TR2`  |
482
 | Transmission 3.xy | `-TR3`  |
475
 | Transmission 3.xy | `-TR3`  |
483
 
476
 
484
-Most of the Toolbox pages don't write to the database and all of them should work.
485
 For more BitTorrent info see
477
 For more BitTorrent info see
486
 [Calomel's rTorrent hacking guide](https://calomel.org/rtorrent_mods.html).
478
 [Calomel's rTorrent hacking guide](https://calomel.org/rtorrent_mods.html).
487
 
479
 

Loading…
Cancel
Save