Install Mattermost in Ubuntu 16.04 LTS

Source: Internet
Author: User

You can install the product-level mattermost system on one to three machines; there are three key components: proxy, database, mattermost; You can install them on one machine or one on each, if there are only two machines, Then the proxy and mattermost can be installed on one machine, the database is installed on another machine;

Database selection, here you can use MySQL or PostgreSQL (I am accustomed to using MySQL, followed mainly based on MySQL). An agent can use Nginx

  1. Install Ubuntu system
    On each component of the machine, first install the Ubunut 16.04LTS system, make sure to update to the latest security patches, execute the following command:
    mysql> sudo apt-get update
    mysql> sudo apt-get upgrade
    After the system is updated, proceed to the installation of each component by doing the following

  2. Installing the MySQL Database
    . installing MySQL with Apt-get install
    mysql> sudo apt-get install Mysql-server

    . log in as root user MySQL
    Mysql> Mysql-u Root-p

    . Create mattermost user ' Mmuser '
    mysql> create user ' mmuser ' @ '% ' identified by ' Mmuser-password ';
    Where% means that all the machines on the net can be connected, using a specific IP address more secure point
    mysql> create user ' mmuser ' @ ' 10.10.10.2 ' identified by ' Mmuser-password ';


    . Create a Mattermost database
    Mysql> CREATE DATABASE Mattermost


    . Allow access to Mmuser users
    Mysql> Grant all privileges the mattermost.* to ' Mmuser ';


    . Quit MySQL
    Mysql> exit

  3. Installing Mattermost

    . Download the latest version of the source code
    wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz

    . Unzip the file

    TAR-XZVF mattermost*.gz

    . Move to the/OPT directory
    sudo mv mattermost/opt


    . Create a storage directory
    sudo mkdir/opt/mattermost/data

    . Set up system groups and users to run these service components, and then set the owner and permissions of the working directory
    sudo useradd--system--user-group mattermost
    sudo chown-r mattermost:mattermost/opt/mattermost
    sudo chmod-r g+w/opt/mattermost

    . Set the database driver, modify the configuration in the/opt/mattermost/config/config.json file, take MySQL for example

    A. Set "drivername" to "MySQL"
    B. Set "DataSource" as shown below, where Mmuser-password is the password to log in to MySQL, Host-name-or-ip is the MySQL server address, Mattermost is the database name
    "Mmuser:<mmuser-password> @tcp (
    Test whether the mattermost can be run.

    Cd/opt/mattermost/bin
    Sudo-u Mattermost./platform

    . set Mattermost to start and stop using SYSTEMD
    A. Sudo touch/lib/systemd/system/mattermost.service
    B. Enter the following in the file created above:

  4. [Unit] Description=mattermostafter=network.targetafter=mysql.servicerequires=postgresql.service[service]type= Simpleexecstart=/opt/mattermost/bin/platformrestart=alwaysrestartsec=10workingdirectory=/opt/mattermostuser= Mattermostgroup=mattermostlimitnofile=49152[install]wantedby=multi-user.target


C. sudo systemctl start mattermost.service
D. Verify that the mattermost is operating correctly

Curl http://localhost:8065

E. Setup mattermost with machine start-up

sudo systemctl enable Mattermost.service


Install Mattermost in Ubuntu 16.04 LTS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.