Tout ce qui importe le plus devrait être disponible sur mattermost.domena.pl 8
le guide suivant décrit comment installer Mattermost sur Alma Linux 8.
Fait en passant quelques commandes du terminal.
Tout d'abord, nous installons la commande du serveur MySQL:
1  | dnf install mariadb-server -y  | 
Lancez-le sur votre système:
1 2  | systemctl start mariadb systemctl enable mariadb  | 
Accédez à la configuration du serveur MySQL et de donner le mot de passe root en tapant:
1  | mysql_secure_installation  | 
Nous répondons aux questions comme suit:
1 2 3 4 5 6 7 8  | 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  | 
Au cours de ce processus, nous donnons le mot de passe root.
L'étape suivante consiste à créer la base de données et l'utilisateur. Se connecter à la commande mysql:
1  | mysql -u root -p  | 
Nous desservons déjà fournies par nous mot de passe root et de créer une base de données:
1  | CREATE DATABASE mattermostdb;  | 
Ensuite, nous créons un utilisateur et lui attribuer l'autorisation:
1  | GRANT ALL PRIVILEGES ON mattermostdb.* TO mattermost@localhost IDENTIFIED BY 'naszehasło';  | 
naszehasło tout bien sûr, nous remplacer votre mot de passe.
pouvoirs Recharger et repartez avec MySQL
1 2  | FLUSH PRIVILEGES; EXIT;  | 
Installation Mattermost
Au début, ajoutez un utilisateur du système:
1  | useradd --system --user-group mattermost  | 
commande de charge Mattermosta:
1  | wget https://releases.mattermost.com/6.0.2/mattermost-6.0.2-linux-amd64.tar.gz  | 
déballer:
1  | tar -xf mattermost-6.0.2-linux-amd64.tar.gz  | 
Mattermosta déplacer les fichiers vers le répertoire / opt
1  | mv mattermost /opt  | 
Nous donnons les autorisations appropriées:
1 2 3  | mkdir /opt/mattermost/data chown -R mattermost:mattermost /opt/mattermost chmod -R g+w /opt/mattermost  | 
configuration Mattermost
modifier Mattermosta le fichier de configuration pour se connecter à la base de données créée précédemment
1  | nano /opt/mattermost/config/config.json  | 
nous trouvons la section “SqlSettings”: { et configure comme suit:
1 2 3  |  "SqlSettings": {     "DriverName": "mysql",     "DataSource": "mattermost:naszehasło@tcp(localhost:3306)/mattermostdb?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s",  | 
L'étape suivante consiste à créer un service de système que nous pouvons gérer simplement et de courir en arrière-plan.
Créez un fichier /etc/systemd/system/mattermost.service
1  | nano /etc/systemd/system/mattermost.service  | 
Un contenu donné:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | [Unit] Description=Mattermost After=syslog.target network.target mysqld.service [Service] Type=notify WorkingDirectory=/opt/mattermost User=mattermost ExecStart=/opt/mattermost/bin/mattermost PIDFile=/var/spool/mattermost/pid/master.pid TimeoutStartSec=3600 LimitNOFILE=49152 [Install] WantedBy=multi-user.target  | 
reload démon:
1  | systemctl daemon-reload  | 
nous lançons:
1 2  | systemctl start mattermost  systemctl enable mattermost  | 
Statut des services que nous pouvons voir en tapant:
1  | systemctl status mattermost  | 
Ci-dessous un exemple de journal:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  | ? mattermost.service - Mattermost    Loaded: loaded (/etc/systemd/system/mattermost.service; disabled; vendor preset: disabled)    Active: active (running) since Sat 2022-01-15 14:12:29 UTC; 7s ago  Main PID: 15201 (mattermost)     Tasks: 32 (limit: 11411)    Memory: 265.2M    CGroup: /system.slice/mattermost.service            ??15201 /opt/mattermost/bin/mattermost            ??15298 plugins/com.mattermost.plugin-channel-export/server/dist/plugin-linux-amd64            ??15299 plugins/com.mattermost.nps/server/dist/plugin-linux-amd64            ??15308 plugins/playbooks/server/dist/plugin-linux-amd64            ??15313 plugins/focalboard/server/dist/plugin-linux-amd64 Jan 15 14:12:26 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:26.344 Z","level":"info","msg":"Sent notification of next survey> Jan 15 14:12:26 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:26.402 Z","level":"info","msg":"Post.Message has size restrictio> Jan 15 14:12:26 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:26.499 Z","level":"info","msg":"info [2022-01-15 14:12:26.497 Z]> Jan 15 14:12:26 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:26.537 Z","level":"info","msg":"\n    -- collation of mattermost> Jan 15 14:12:28 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:28.297 Z","level":"info","msg":"debug [2022-01-15 14:12:28.295 Z> Jan 15 14:12:28 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:28.804 Z","level":"info","msg":"info [2022-01-15 14:12:28.803 Z]> Jan 15 14:12:29 almalinux8 systemd[1]: Started Mattermost. Jan 15 14:12:29 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:29.149 Z","level":"info","msg":"Starting Server...","caller":"ap> Jan 15 14:12:29 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:29.150 Z","level":"info","msg":"Server is listening on [::]:8065> Jan 15 14:12:29 almalinux8 mattermost[15201]: {"timestamp":"2022-01-15 14:12:29.150 Z","level":"info","msg":"Sending systemd READY notificati>  | 
plugins/focalboard/server/dist/plugin-linux-amd64Jan
plugins/focalboard/server/dist/plugin-linux-amd64Jan:
1  | dnf install nginx -y  | 
plugins/focalboard/server/dist/plugin-linux-amd64Jan
1  | nano /etc/nginx/conf.d/mattermost.conf  | 
le contenu:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  |  server {         listen       80;         server_name  mattermost.domena.pl;         # Load configuration files for the default server block.         include /etc/nginx/default.d/*.conf;         location / { 	proxy_pass http://localhost:8065/;             index  index.html index.htm;         }         error_page 404 /404.html;             location = /40x.html {         }         error_page 500 502 503 504 /50x.html;             location = /50x.html {         }     }  | 
Nous sauvegardons et rechargeons les services:
1  | systemctl start nginx  | 
1  | systemctl restart nginx  | 
1  | systemctl enable nginx  | 
Nous ajoutons tout au pare-feu et rechargeons.:
1  | firewall-cmd --add-service=http --permanent  | 
1  | firewall-cmd --reload  | 
Tout ce qui importe le plus devrait être disponible sur mattermost.domena.pl
Tout ce qui importe le plus devrait être disponible sur mattermost.domena.pl.






