We previously showed yoiu how to install Mattermost desktop app on Ubuntu… This post shows you how to install the Mattermost server… You’ll learn how to install MariaDB, download and configure Mattermost server….
Mattermost is an open source alternative to Slack messaging platform… It allows teams to communication and collaboration securely from behind the company’s firewall…
This brief tutorial shows students and new users how to install Mattermost server version on Ubuntu 16.04 / 17.10 / 18.04 LTS server…
Mattermost brings teams together to colloborate on projects so work can get done as quickly and efficiently as possible… Whether you’re a small or large enterprise, Mattermost can help your team communicate and colloborate… and these conversations will be available on the desktop, mobile devices and everywhere you have Mattermost installed…
Mattermost helps you:
Discuss topics in private groups, one-to-one or team-wide
Easily share and view image files
Connect in-house systems with webhooks and Slack-compatible integrations
After that, run the commands below to secure MariaDB server by creating a root password and disallowing remote root access.
When prompted, answer the questions below by following the guide.
Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Restart MariaDB server
sudo systemctl restart mariadb.service
After installing MariaDB server, continue below to create Mattermost database and datbase user account…
Now that you’ve install all the packages that are required, continue below to start configuring the servers. First run the commands below to create a blank Mattermost database.
Run the commands below to logon to the database server. When prompted for a password, type the root password you created above.
sudo mysql -u root -p
Then create a database called mattermost
CREATE DATABASE mattermost;
Create a database user called mattermostuser with new password
CREATE USER 'mattermostuser'@'localhost' IDENTIFIED BY 'new_password_here';
Then grant the user full access to the database.
GRANT ALL ON mattermost.* TO 'mattermostuser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
Finally, save your changes and exit.
Step 2: Download and Configure Mattermost Server
After setting up Mattermost, run the commands below to download Mattermost server archive…
cd /tmp && wget https://releases.mattermost.com/5.0.1/mattermost-5.0.1-linux-amd64.tar.gz
After downloading the archive, run the commands below to extract it… and move it to the /opt directory…
tar -xvzf mattermost*.gz
sudo mv mattermost /opt
Next, create a storage directory for files..
sudo mkdir /opt/mattermost/data
The storage directory will contain all the files and images that your users post to Mattermost, so you need to make sure that the drive is large enough to hold the anticipated number of uploaded files and images.
Next, set up a system user and group called mattermost that will run this service, and set the ownership and permissions. Create the Mattermost user and group by running the commands below:
sudo useradd --system --user-group mattermost
Set the user and group mattermost as the owner of the Mattermost files: