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,11 +1,9 @@
1 1
 # Install
2 2
 
3 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 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 8
 # Debian system profile
11 9
 
@@ -60,9 +58,7 @@ Then upgrade the system:
60 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 62
 For more info about SSH, Unbound, NSD, OpenSMTPd, Dovecot, Unix users, etc.,
67 63
 [please see the original launch announcement](https://github.com/biotorrents/announcement).
68 64
 
@@ -71,8 +67,8 @@ For more info about SSH, Unbound, NSD, OpenSMTPd, Dovecot, Unix users, etc.,
71 67
 Install Nginx and Certbot with `apt install nginx certbot python3-certbot-nginx`.
72 68
 
73 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 73
 ```nginx
78 74
 server {
@@ -127,9 +123,8 @@ server {
127 123
 ```
128 124
 
129 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 129
 ```nginx
135 130
 server {
@@ -163,17 +158,16 @@ Add this entry to the root crontab to renew the certs daily:
163 158
 
164 159
 Please see the
165 160
 [Certbot docs](https://certbot.eff.org/docs/using.html)
166
-for more info.
167
-Also see the
161
+and
168 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 165
 ## MariaDB
172 166
 
173 167
 Install MariaDB with `apt install mariadb-server`
174 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 171
 Unix sockets are preferred for the database running on localhost.
178 172
 The config should look similar to this, paying attention to `sql-mode`:
179 173
 
@@ -210,7 +204,7 @@ If you'd like to use TLS crypto in your database connections,
210 204
 They contain the necessary info to generate self-signed certs.
211 205
 
212 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 209
 ```mysql
216 210
 CREATE DATABASE gazelle_development;
@@ -227,14 +221,14 @@ The basic PHP package:
227 221
 `apt install php php-dev php-fpm`.
228 222
 
229 223
 The PHP extensions.
230
-Note that there are two PHP memcached extensions.
224
+There are two PHP memcached extensions.
231 225
 The correct one is just `php-memcache` without the "d."
232 226
 Your distro may require other extensions:
233 227
 `php-apcu php-mbstring php-memcache php-mysql`.
234 228
 
235 229
 BioTorrents.de also supports the
236 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 232
 Optionally, please install
239 233
 [php-blake3](https://github.com/cypherbits/php-blake3).
240 234
 
@@ -248,9 +242,9 @@ I strongly recommend crafting a
248 242
 Install memcached with `apt install memcached`.
249 243
 
250 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 250
 -d
@@ -265,7 +259,7 @@ The required `/etc/memcached.conf` content:
265 259
 A helper script to quickly bring up a second memcached as root:
266 260
 
267 261
 ```shell
268
-#!/bin/bash
262
+#!/bin/sh
269 263
 memcached -d -m 5120 -s /var/run/memcached/memcached-dev.sock -a 0777 -t16 -C -u memcache
270 264
 ```
271 265
 
@@ -294,8 +288,8 @@ Please see
294 288
 # Application setup
295 289
 
296 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 294
 ## Gazelle
301 295
 
@@ -314,13 +308,12 @@ home folder, subfolder of `/var/www`, etc.
314 308
 
315 309
 ```shell
316 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 313
 chown -R biotorrents:biotorrents /var/www/log
321 314
 
322 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 317
 chown -R www-data:www-data /var/www/pictures /var/www/torrents /var/www/torrents-dev
325 318
 ```
326 319
 
@@ -341,11 +334,11 @@ find . -type f -print0 | xargs -0 chmod 0644
341 334
 find . -type d -print0 | xargs -0 chmod 0755
342 335
 ```
343 336
 
344
-### Gazelle app config
337
+### Application config
345 338
 
346 339
 [`classes/config.php`](https://github.com/biotorrents/gazelle/blob/development/classes/config.template.php)
347 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 343
 - `'DEBUG_MODE' = false`
351 344
 - `'OPEN_REGISTRATION' = true`
@@ -356,7 +349,7 @@ BioTorrents.de uses a singleton class with extended recursive ArrayObject suppor
356 349
 [`$ENV = ENV::go()`](https://github.com/biotorrents/gazelle/blob/development/classes/env.class.php).
357 350
 
358 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 354
 - `SITE_DOMAIN` and `IMAGE_DOMAIN`
362 355
 - `WEB_ROOT` and `SERVER_ROOT`
@@ -380,7 +373,7 @@ mv composer.phar /var/www/bin/composer
380 373
 ```
381 374
 
382 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 378
 ### SCSS and fonts
386 379
 
@@ -394,7 +387,7 @@ Then install SassC with `apt install sassc`.
394 387
 This should be a for loop, to compile the CSS:
395 388
 
396 389
 ```shell
397
-#!/bin/bash
390
+#!/bin/sh
398 391
 styles="/var/www/html/dev.biotorrents.de/static/styles"
399 392
 sassc "$styles/beluga/beluga.scss" > "$styles/beluga.css"
400 393
 sassc "$styles/bookish/bookish.scss" > "$styles/bookish.css"
@@ -415,8 +408,8 @@ and developing TLS support.
415 408
 The patched version is available at
416 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 414
 ```shell
422 415
 apt install \
@@ -446,9 +439,9 @@ make
446 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 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 446
 ## IRC and kana (sitebot)
454 447
 
@@ -459,12 +452,12 @@ Docs pending the completion of sitebot API integration.
459 452
 At this point it should be possible to register for the site.
460 453
 The first account is the sysop so please act quickly here.
461 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 457
 Configure a client whitelist on the Toolbox page by the
465 458
 [BitTorrent spec's peer ID list](https://wiki.theory.org/index.php/BitTorrentSpecification#peer_id).
466 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 461
 [rakshasa's library](https://github.com/rakshasa/libtorrent):
469 462
 
470 463
 | Client Name       | Peer ID |
@@ -481,7 +474,6 @@ Note that LibTorrent 0.1x.y also covers rTorrent/ruTorrent and other clients tha
481 474
 | Transmission 2.xy | `-TR2`  |
482 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 477
 For more BitTorrent info see
486 478
 [Calomel's rTorrent hacking guide](https://calomel.org/rtorrent_mods.html).
487 479
 

Loading…
Cancel
Save