Logo       PBase-Foundation

Mattermost

Installation - Summary

Substitute your server's subdomain and admin email with the echo commands below. If your server is registered in DNS as your domain's root provide an empty string instead of "mattermost" shown in the example. After providing these defaults run the yum commands as detailed below.

echo "mattermost" > /root/DEFAULT_SUB_DOMAIN.txt
echo "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txt
yum -y install https://pbase-foundation.com/pbase-repo.rpm
yum -y install pbase-preconfig-postgres-mattermost
yum -y install pbase-postgres
yum -y install pbase-mattermost
yum -y install pbase-lets-encrypt

Installation - Step by Step

Here is how to install the Mattermost messaging platform. It assumes your host is registered in DNS on a "mattermost" subdomain like mattermost.myexample.com and the installer will use Let's Encrypt to setup HTTPS.

Step 1: Provide your subdomain and admin email address by using the echo commands below to create a text file under the /root directory for each value. For example:
echo "mattermost" > /root/DEFAULT_SUB_DOMAIN.txt
echo "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txt

Step 2: Install the pbase-repo package with the command:
yum -y install https://pbase-foundation.com/pbase-repo.rpm

... when it runs, its output will point out the file pbase_repo.json that now holds copies of the defaults.

Step 3: Install the Mattermost dependencies and pre-configuration package with the command:
yum -y install pbase-preconfig-postgres-mattermost

... it's output will tell you to review the files in the module-config.d directory.

Step 4: Install a local database with the pbase-postgres package:
yum -y install pbase-postgres

...or to configure a non-local Postgres instance you must edit pbase_postgres.json in the module-config.d directory instead to provide its connection information.

Step 5: Install the pbase-mattermost package with the command:
yum -y install pbase-mattermost

Step 6: If your host is registered in DNS, installing the pbase-lets-encrypt package will generate a certificate for HTTPS connections:
yum -y install pbase-lets-encrypt

When the pbase-mattermost and pbase-lets-encrypt packages complete you should have a full working instance of Mattermost ready to be administered at https://mattermost.myexample.com depending on your domain name.

Extras

You should secure your server ports with pbase-firewall-enable and lock down SSH access with the pbase-ssh-fail2ban package.

yum -y install pbase-ssh-fail2ban
yum -y install pbase-firewall-enable

Configuration Options

{
"pbase_mattermost": {
"port": 8065,
"addApacheProxy": true,
"urlSubDomain": ""
}
}

Source code of this RPM

This is the RPM .spec file containing the code that is executed by the pbase-mattermost installer. https://github.com/marklangbehn/pbase-rpm-installer/blob/master/applications/pbase-mattermost/rpmbuild/SPECS/pbase-mattermost.spec

More about Mattermost

Visit the Mattermost project at:
https://mattermost.com/
"Mattermost is a high trust, open source collaboration platform built for developers."

The scripts and dependencies of the pbase-mattermost rpm are based on the steps described in the self-managed installation page:
https://docs.mattermost.com/install/install-rhel-8.html