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": ""
}
}