[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

This is an old revision of the document!


Mattermost

Installing PostgreSQL Database.

With Unix socket.

A SlackBuild for building and installing PostgreSQL can be found at SlackBuilds.org; follow the instructions there, and install PostgreSQL. After installing PostgreSQL perform the following steps:

  1. Initialize the PostgreSQL database:
    su postgres -c "initdb -D /var/lib/pgsql/10.2/data --locale=en_US.UTF-8 -A md5 -W"
  2. Start the PostgreSQL database:
    /etc/rc.d/rc.postgresql start
  3. Switch to the postgres Linux user account that was created during the installation.
    su -l postgres
  4. Start the PostgreSQL interactive terminal.
    psql
  5. Create the Mattermost database.
    CREATE DATABASE mattermostdb;
  6. Create mattermost user and give it the rights on the database:
    CREATE USER mattermost;
    GRANT ALL PRIVILEGES ON DATABASE mattermostdb to mattermost;
  7. Exit out of psql with \q.
  8. Setup the Unix socket by editing file: /var/lib/pgsql/10.2/data/pg_hba.conf, replace
    # "local" is for Unix domain socket connections only
    local all all md5

    with

    local mattermostdb mattermost peer map=mattermap
  9. Add the following to “/var/lib/pgsql/10.2/data/pg_ident.conf”
    echo "mattermap mattermosdb mattermost" >> /var/lib/pgsql/10.2/data/pg_ident.conf
  10. Restart PostgreSQL
    exit
    /etc/rc.d/rc.postgresql restart
  11. Add the mattermost system user:
    useradd --system --user-group mattermost
  12. Verify things are working thus far
    sudo -u mattermost psql --dbname=mattermostdb --username=mattermost

Sources

 howtos:misc:network:mattermost ()