-
Notifications
You must be signed in to change notification settings - Fork 98
/
INSTALL.txt
77 lines (52 loc) · 2.89 KB
/
INSTALL.txt
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
INSTALLATION NOTES
Note: We make no guarantee of completeness or accuracy of these install notes.
The most up-to-date notes on a basic install setup is found through our
docker-compose.yml setup we use for development. Please reference it before
asking questions.
Note: If overwhelmed by the these instructions, we urge you to NOT run a tracker
in production. Doing such requires more additional steps not covered here
(setting up proxies, tunneling, LUKS encryption, TCP tuning, etc.) that messing
up would put the privacy / security of both yourself and your users at risk.
The docker installation does all this for you, but in production you need
to do this by hand.
1. First, install the PHP and JS dependencies to setup and run the site.
composer install
yarn install
2. Install and setup the following services:
* MySQL
* memcached
* sphinxsearch
Depending on your OS, these may be available in the package manager. You can see
what versions of the above we support by looking at our docker-compose.yml
configuration.
3. For up memcached, we recommend giving it multiple threads and several
gigs of RAM, for example:
memcached -d -m 5120 -s /var/run/memcached.sock -a 0777 -t4 -C -u nobody
This will give memcached 4 threads and 5GB of RAM. Tune this accordingly
depending on how large your server and how many users you have. Look at
your cache eviction. If you are seeing hundreds of items evicted per second,
you need to scale up drastically. If you are seeing zero evictions, you
have allocated too much RAM and should scale down. Ideally you should only
see expired unfetched activity.
4. Create the required Mysql roles according to 01-MysqlRoles.txt
Use www.random.org to generate passwords.
5. Review lib/config.php. Edit lib/override.config.php as needed.
You should be able to launch boris from the command line.
6. Run the phinx migrations and seeds to populate the database.
vendor/bin/phinx migrate
7. Configure Sphinx - we recommend you use the included .docker/sphinxsearch/sphinx.conf
You can copy this to /etc/sphinx/sphinx.conf. You need to fill in the
details of the SQL server from lib/override.config.php and you may need to
create the `/var/lib/sphinx` folder.
More information is available at: https://sphinxsearch.com/docs/current.html
Run the indexer to finish the setup:
/usr/bin/indexer -c /etc/sphinx/sphinx.conf --all
8. Generate stylesheets and their previews by running the following:
yarn build
Note, generating the previews requires a Chrome instance on the host.
9. Setup your web server. We recommend using nginx (https://www.nginx.com/).
A sample configuration for nginx can be found in .docker/web/nginx.conf.
10. Set up the cronjobs for the background task scheduler and Sphinx updates.
see docs/crontab
11. Start modifying stuff. Hopefully, everything will have gone smoothly so far
and nothing will have exploded (ha ha ha)