Due to dependencies of Mattermost on more recent versions of MySQL and Nginx, than provided by some of the supported distributions of Kopano the Mattermost packages are only available for the following distributions (some more distributions may be available through the Kopano community channel).
- Debian 8.0
- Debian 9.0
- SLES 12
- Ubuntu 16.04
- Ubuntu 18.04
If you want to install Mattermost on Univention the following steps are not applicable. Instead you should install the official Univention Mattermost app which is based on the packages described below.
- MySQL >= 5.6.2 or MariaDB >= 10.0.5
- Nginx 1.10 or Apache 2.4 (Nginx is preferred)
The packages can either be retrieved from the Kopano package repository (available only to customers with a valid Kopano subscription) or downloaded as an archive including the latest development versions from the Kopano Community downloads. The following chapter will explain the installation through the Kopano package repository.
Configuring the Kopano package repositories¶
The package repository can either be accessed by using a combination of username & password (account can be registered at the Kopano Portal or by using the username
serial and your Kopano serial (e.g.
Z...) as the password.
The repository url to be used depends on the release type (final for Mattermost long term-support releases and pre-final for the monthly Mattermost releases) and the Linux distribution. It is recommended to visit https://download.kopano.io/supported/mattermost:/ with a webbrowser and navigate to the desired release type and distribution and copy the url. For the final release channel and Ubuntu 16.04 the url will for example be https://download.kopano.io/supported/mattermost:/final/Ubuntu_16.04/.
Adding the repository for Ubuntu 16.04:
URL=https://serial:email@example.com/supported/mattermost:/final/Ubuntu_16.04/ echo "deb $URL /">> /etc/apt/sources.list.d/kopano-mattermost.list curl $URL/Release.key | apt-key add - apt update
See the Kopano Core Administrator Manual for more information about our package repositories.
Installing the Mattermost Team edition¶
After the repository has been added Mattermost can be installed by retrieving the
mattermost-server package with your package manager.
Installing packages on Ubuntu 16.04:
apt install mattermost-server
Installing the Mattermost Enterprise edition¶
To benefit from the additional features of the Mattermost Enterprise (like LDAP based single-sign on, see https://about.mattermost.com/features/ for more information) this version has been packaged as well. The mattermost-server-enterprise packages uses the same paths for configuration and logfiles and is designed to be a drop-in replacement for the mattermost-server packages, which means that it is possible to switch between the two packages with easily.
Installing packages on Ubuntu 16.04:
apt install mattermost-server-enterprise
A license file is required to enable the features of the Mattermost Enterprise editions. An evaluation license can be requested from https://mattermost.com/trial/ (please allow up to 72 hours for delivery).
Configuring Mattermost and its dependencies¶
This chapter explains the minimum required configuration to get started with Mattermost.
To successfully start Mattermost needs to know credentials of a user on your MySQL server and a pre-created database. To ease this process we included a small script called mattermost-db-configure in the packages that creates a local MySQL user and database for you.
$ mattermost-db-configure usage: /usr/sbin/mattermost-db-configure -u <mysql-user> -p <mysql-password> -d <mattermost-database> -n <mattermost-dbuser> -o <mattermost-dbpass>
<mysql-password> is the name and password of the MySQL root user (or a user with enough privileges to create the mattermost user and database).
The script will also automatically insert the database credentials into the Mattermost configuration. Please restart Mattermost once to apply these changes.
$ service mattermost restart
The packages include webserver configuration files for Nginx and Apache to make Mattermost accessible from a dedicated domain, e.g. mattermost.example.org. These example configuration files still need to be extended in regards to actual hostnames and ssl configuration.
Enabling Nginx vHost¶
ln -s /etc/nginx/sites-available/mattermost /etc/nginx/sites-enabled/
Enabling Apache vHost¶
a2enmod rewrite proxy proxy_http proxy_wstunnel a2ensite mattermost
For additional configuration options please check https://docs.mattermost.com/guides/administrator.html