tweak install.md for completeness (#742)

This commit is contained in:
QuietMisdreavus 2020-01-06 18:30:05 -07:00 committed by Eugen Rochko
parent 0fc9e47a8f
commit aa9cc59f95
1 changed files with 23 additions and 2 deletions

View File

@ -54,6 +54,10 @@ adduser --disabled-login mastodon
We can then switch to the user:
```bash
su - mastodon
```
And proceed to install rbenv and rbenv-build:
```bash
@ -68,8 +72,8 @@ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
Once this is done, we can install the correct Ruby version:
```bash
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.6.1
rbenv global 2.6.1
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.6.5
rbenv global 2.6.5
```
Default gem version shipped with ruby\_2.6.0 is incompatible with latest bundler, so we need to update gem:
@ -86,6 +90,10 @@ gem install bundler --no-document
Return to the root user:
```bash
exit
```
## Setup <a id="setup"></a>
### Setting up PostgreSQL <a id="setting-up-postgresql"></a>
@ -100,6 +108,10 @@ You will need to create a PostgreSQL user that Mastodon could use. It is easiest
Open the prompt:
```bash
sudo -u postgres psql
```
In the prompt, execute:
```sql
@ -113,6 +125,10 @@ Done!
It is time to download the Mastodon code. Switch to the mastodon user:
```bash
su - mastodon
```
#### Checking out the code <a id="checking-out-the-code"></a>
Use git to download the latest stable release of Mastodon:
@ -151,6 +167,10 @@ The configuration file is saved as `.env.production`. You can review and edit it
Youre done with the mastodon user for now, so switch back to root:
```bash
exit
```
### Setting up nginx <a id="setting-up-nginx"></a>
Copy the configuration template for nginx from the Mastodon directory:
@ -193,6 +213,7 @@ Then edit the files to make sure the username and paths are correct:
Finally, start and enable the new systemd services:
```bash
systemctl daemon-reload
systemctl start mastodon-web mastodon-sidekiq mastodon-streaming
systemctl enable mastodon-*
```