Difference between revisions of "User:Woozle/Mastodon/setup"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
Line 28: Line 28:
 
** ...and then I had to look up how to add a user from the command line so I could log in, and ended up just creating the mastodon user (and group) manually:
 
** ...and then I had to look up how to add a user from the command line so I could log in, and ended up just creating the mastodon user (and group) manually:
 
** <bash>adduser --system --group mastodon</bash>
 
** <bash>adduser --system --group mastodon</bash>
 +
** That command needs a little tweaking, because it defaults to disallowing login (shell is /bin/false). I had to change it to /bin/bash via Webmin.

Revision as of 19:43, 23 April 2017

I'm trying to use Mastodon with Apache and MySQL, for reasons I can go into, rather than the apparently-assumed defaults of nginx and Postgres. (It's never explicitly stated "no, Mastodon will not work with anything else", but this may turn out to be the case.)

I'm using these instructions as a guide.

Notes

  • Created a virtual server for Mastodon (icmstdn.com) using Virtualmin.
  • Used Git to clone Mastodon (repository clone URL) into a subfolder of public_html
    • Mastodon's files are now in /home/icmstdn/public_html/mastodon
  • Created file .env.production (it didn't already exist) and then took a look at .env.production.sample to see what needs to be set.

Take 1

There doesn't seem to be any way to tell it which db engine to use -- but this looks like it could be a standard Ruby or Ruby on Rails config file -- so let's check my Redmine installation (which uses MySQL) to see if there are any clues...

Nope, no joy there.

Tentatively, Mastodon appears to be too tightly intertwined with Postgres to even attempt to use another dbe without a substantial rewrite (see this and the accompanying thread).

So I've set up a completely fresh virtual server with 2GB of RAM, and am following the instructions almost to the letter ("almost" because I prefer to do everything as root rather than having to type "sudo" over and over again... and also using "apt" instead of "apt-get" because the former is slightly more friendly).

Take 2

  • Is there a better way to install "yarn"? I got a message saying "npm WARN deprecated yarn@0.22.0: It is recommended to install Yarn using the native installation method for your environment. See https://yarnpkg.com/en/docs/install" -- but then it seemed to work anyway... From the link, it looks like I'd be advised to set up the repository. Will do that at some point.
  • The postgres (v9.5 (9.5.6-0ubuntu0.16.04)) installation generated about a dozen copies of this message: "Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78."
  • Tentatively, when it says "Under Ubuntu 16.04, you will need to explicitly enable ident authentication so that local users can connect to the database without a password", the "local users" are not users of the Mastodon app but the user(s) setting up and administering Mastodon who might need to do various operations in Postgres. The previous line seems to create a single Postgres user named "mastodon", heavily implying that yes, the app itself only needs the one db user. Possibly the whole business with identd could, theoretically, be skipped by setting up a password...
  • Another message which doesn't seem to have prevented anything from working:
pidentd.service is not a native service, redirecting to systemd-sysv-install

Executing /lib/systemd/systemd-sysv-install enable pidentd

  • When I got to the step about installing rbenv, I had to break off and install Webmin because that's the easiest way for me to manage users, and I needed to create a "mastodon" user:
    • <bash>dpkg -i webmin_1.831_all.deb</bash>
    • This generates dependency errors. To fix them:
    • <bash>apt -f install</bash>
    • ...and then I had to look up how to add a user from the command line so I could log in, and ended up just creating the mastodon user (and group) manually:
    • <bash>adduser --system --group mastodon</bash>
    • That command needs a little tweaking, because it defaults to disallowing login (shell is /bin/false). I had to change it to /bin/bash via Webmin.