Install Mattermost - OtagoPolytechnic/op-mattermost GitHub Wiki

Setup the Mattermost Server

Download the Mattermost by using wget command and make sure it the latest version of the Mattermost but in this we are using version 3.4.0

wget https://releases.mattermost.com/v3.4.0/mattermost-3.4.0-linux-amd64.tar.gz

Unzip the Mattermost package by using the following command

tar -xvzf mattermost-3.4.0-linux-amd64.tar.gz

Create the directory to storage the file. To set this up we will make the directory is located at /mattermost/data

Create the directory by using the following command

sudo mkdir -/mattermost/data

Set the ubuntu user as the directory owner by using the following command

sudo chown -R ubuntu /mattermost

To Configure the Mattermost server by editing the config.json file at /mattermost/config

Replace the DriverName“: ”mysql“ with DriverName”:“postgres”

Replace the following

"DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8"

With

"DataSource": "postgres://mmuser:[email protected]:5432/mattermost?sslmode=disable&connect_timeout=10"

Save and exit the Mattermost configuration file

To Test the Mattermost Server

cd ~/mattermost/bin

Run the Mattermost Server by using the following command

  • ./platform

  • You should be able to see a console log like this Server is listening on :8065

  • Using the ctrl-c to stop the server

Setup the Mattermost to use the upstart daemon which will handles supervision of the Mattermost process

sudo touch /etc/init/mattermost.conf

sudo vi /etc/init/mattermost.conf

Copy the Following into the /etc/init/mattermost.conf

start on runlevel [2345]
stop on runlevel [016]
respawn
limit nofile 50000 50000
chdir /home/ubuntu/mattermost
setuid ubuntu
exec bin/platform

To start the mattermost by using the following command

sudo start mattermost

To Verify the service is running by using the following command

curl http://10.10.10.2:8065

You now should be able to see a page titles of the Mattermost – Signup

To Stop the Mattermost process by using the following command

sudo stop mattermost
⚠️ **GitHub.com Fallback** ⚠️