From fcab2b3c976188a512d809a62abaf2f0fa407e35 Mon Sep 17 00:00:00 2001 From: Sadiq Saif Date: Sun, 20 Aug 2017 16:50:51 -0400 Subject: [PATCH] "gcc-6" should just be "gcc" (#379) * "gcc-6" should just be "gcc" gcc-6 isn't a valid package name * It was `adduser mastodon` for a reason making it with `--system and --disabled-password` breaks the rest of the guide where `su - mastodon` is used. I use this method as it makes maintaining the Mastodon instance easier. * eval "$(rbenv init -)" should be in ~/.bashrc as well otherwise the correct ruby version isn't used * Use sudo su - instead --- Running-Mastodon/Production-guide.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Running-Mastodon/Production-guide.md b/Running-Mastodon/Production-guide.md index 76f4c0d..b637444 100644 --- a/Running-Mastodon/Production-guide.md +++ b/Running-Mastodon/Production-guide.md @@ -88,7 +88,7 @@ Now you need to install [Yarn](https://yarnpkg.com/en/) plus some more software. - Other -dev packages, g++ - these are needed for the compilation of Ruby using ruby-build. ```sh -apt -y install imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc-6 autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev nginx redis-server redis-tools postgresql postgresql-contrib letsencrypt yarn libidn11-dev libicu-dev +apt -y install imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev nginx redis-server redis-tools postgresql postgresql-contrib letsencrypt yarn libidn11-dev libicu-dev ``` ### Dependencies That Need To Be Added As A Non-Root User @@ -96,14 +96,14 @@ apt -y install imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-co Let us create this user first: ```sh -adduser --system --disabled-password mastodon +adduser mastodon ``` Log in as the `mastodon` user: ```sh -su - mastodon +sudo su - mastodon ``` We will need to set up [`rbenv`](https://github.com/rbenv/rbenv) and [`ruby-build`](https://github.com/rbenv/ruby-build): @@ -112,6 +112,7 @@ We will need to set up [`rbenv`](https://github.com/rbenv/rbenv) and [`ruby-buil git clone https://github.com/rbenv/rbenv.git ~/.rbenv cd ~/.rbenv && src/configure && make -C src echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc +echo 'eval "$(rbenv init -)"' >> ~/.bashrc # Restart shell exec bash # Check if rbenv is correctly installed @@ -363,7 +364,7 @@ For this we will switch to the `mastodon` system user: ```sh -su - mastodon +sudo su - mastodon ``` Change directory to `~live` and edit the [Mastodon](https://github.com/tootsuite/mastodon/) application configuration: