User:Woozle/toot.cat/2018/04/07

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< User:Woozle
Revision as of 21:57, 7 April 2018 by Woozle (talk | contribs) (Created page with "Loosely following [https://anystack.xyz/how-to-install-mastodon-ubuntu/ these instructions]... I just do everything in root rather than using sudo, because that's how I roll....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Loosely following these instructions...

I just do everything in root rather than using sudo, because that's how I roll.

Things done:

  • Create droplet (4GB- 2CPU - 80GB - $20, Ubuntu 16.04, SFO2, IPv6, Gonzo key)
  • apt update
  • apt upgrade
  • install node.js:
  • install redis-server:
    • apt install redis-server redis-tools
  • install PostgreSQL (Pg):
    • apt install postgresql postgresql-contrib
  • switch to postgres user, create Mastodon user in Pg:
    • su - postgres
    • psql
    • CREATE USER mastodon CREATEDB;
    • \q

Now, we're trying to enable ident auth in Pg so users can log in without a password.

  • I don't understand why we want to do this; seems like bad security.
  • I tried to do this bit exactly as written, because it looked like it might be user-sensitive, but it didn't work (see below).
  • Can this be done as all one line?
  • sudo sed -i '/^local.*postgres.*peer$/a host all all 127.0.0.1/32 ident' \
  • /etc/postgresql/9.?/main/pg_hba.conf

That didn't work, because after the second line it asked for a password for postgres, which I don't have, and wouldn't accept a blank. So, backing out and trying as root (and all one line):

  • sed -i '/^local.*postgres.*peer$/a host all all 127.0.0.1/32 ident' /etc/postgresql/9.?/main/pg_hba.conf

No error, but also no success message. I will assume successful.

  • install ident daemon:
    • apt install pidentd
    • systemctl enable pidentd
    • Response:
      • pidentd.service is not a native service, redirecting to systemd-sysv-install
      • Executing /lib/systemd/systemd-sysv-install enable pidentd
    • systemctl start pidentd
    • systemctl restart postgresql

Setting Up Ruby

  • apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
  • adduser --disabled-password --disabled-login mastodon
    • Just hitting ENTER in response to all questions, "Y" in response to "Y/n".
  • Change to user mastodon:
    • su - mastodon

WORKING HERE.