Kategorie: Linux

Installation Mattermost system Centos 8

spób following guide describes the installation of the software in the system CentOS Mattermost 8.
Made by spending a few terminal commands.

First, we install the MySQL server command:

dnf install mariadb-server -y

Run it on your system:

systemctl start mariadb
systemctl enable mariadb

Go to the MySQL server configuration and give the root password by typing:

mysql_secure_installation

We answer the questions as follows:

Enter current password for root (enter for none):
Set root password? [Y / N] Y
New password:
Re-enter new 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

During this process we give the root password.

The next step is to create the database and user. Log in to the mysql command:

mysql -u root -p

We serve previously provided by us root password and create a database:

CREATE DATABASE mattermostdb;

Then we create a user and assign him permission:

GRANT ALL PRIVILEGES ON mattermostdb.* TO mattermost@localhost IDENTIFIED BY 'naszehasło';

naszehasło any course we replace your password.

Reload powers and leave with mysql

FLUSH PRIVILEGES;
EXIT;

Installation Mattermost

At the beginning, add a system user:

useradd -d /opt/mattermost -U -M mattermost

Mattermosta charge command:

wget https://releases.mattermost.com/5.21.0/mattermost-5.21.0-linux-amd64.tar.gz

unpack:

takes -xvzf matter most-5.21.0-linux-amd64.tar.gz

Mattermosta move the files to the / opt directory

mv mattermost /opt/

We give the appropriate permissions:

mkdir /opt/mattermost/data
 chown -R mattermost:mattermost /opt/mattermost
 chmod -R g+w /opt/mattermost

Configuration Mattermost

Mattermosta edit the configuration file to connect it to the previously created database

nano /opt/mattermost/config/config.json

we find section “SqlSettings”: { and configure as follows:

 "SqlSettings": {
    "DriverName": "mysql",
    "DataSource": "mattermost:naszehasło@tcp(localhost:3306)/mattermostdb?charset=utf8mb4,utf8u0026readTimeout=30su0026writeTimeout=30s",

Can we go to the directory of the script and pre-launch it:

cd /opt/mattermost
 sudo -u mattermost bin/mattermost

We should like to see the log, everything is OK.

{"level":"info","ts":1585379681.8383002,"caller":"utils/i18n.go:83","msg":"Loaded system translations","for locale":"in","from locale":"/opt/mattermost/i18n/en.json"}
{"level":"info","ts":1585379681.83874,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
{"level":"info","ts":1585379681.8470004,"caller":"sqlstore/supplier.go:221","msg":"Pinging SQL","database":"master"}
{"level":"info","ts":1585379684.7858346,"caller":"sqlstore/upgrade.go:112","msg":"The database schema version has been set","version":"5.21.0"}
{"level":"error","ts":1585379690.8182986,"caller":"app/server_app_adapters.go:129","msg":"SiteURL must be set. Some features will operate incorrectly if the SiteURL is not set. See documentation for details: http://about.mattermost.com/default-site-url"}
{"level":"info","ts":1585379690.821083,"caller":"app/license.go:39","msg":"License key from https://mattermost.com required to unlock enterprise features."}

Mattermosta stop holding down CRTL + C

The next step is to create a system service that we can manage it simply and to run in a background.

Create a file /etc/systemd/system/mattermost.service

nano /etc/systemd/system/mattermost.service

A given content:

[Unit]
Description=Mattermost
After=syslog.target network.target mariadb.service

[Service]
Type=notify
WorkingDirectory=/opt/mattermost
User=mattermost
ExecStart=/opt/mattermost/bin/mattermost
PIDFile=/var/run/mattermost.pid
TimeoutStartSec=3600
LimitNOFILE=49152

[Install]
WantedBy=multi-user.target

reload demon:

systemctl daemon-reload

We launch:

systemctl start mattermost
 systemctl enable mattermost

Status of services we can see by typing:

systemctl status mattermost

Below is a sample log:

 mattermost.service - Mattermost
   Loaded: loaded (/etc/systemd/system/mattermost.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-03-28 03:17:07 EDT; 14s ago
 Main PID: 15204 (mattermost)
    Tasks: 21 (limit: 25028)
   Memory: 120.8M
   CGroup: /system.slice/mattermost.service
           ??15204 /opt/mattermost/bin/mattermost
           ??15214 plugins/com.mattermost.nps/server/dist/plugin-linux-amd64

Mar 28 03:17:07 centos8 mattermost[15204]: {"level":"info","ts":1585379827.1131086,"caller":"app/server.go:247","msg":"Printing current workin>
Mar 28 03:17:07 centos8 mattermost[15204]: {"level":"info","ts":1585379827.1131282,"caller":"app/server.go:248","msg":"Loaded config","source">

Whole should work properly, Mattermost should correspond spending browser naszadresip:8065

After going to the address we should make an initial service configuration.

Linux

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

4 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

4 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

4 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

4 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

4 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

4 years temu