インストールガイド · 7 min read · Jan 23, 2026

CentOS 7にPostgreSQLとNginxを使用してMattermostをインストールする

Mattermostはオープンソースの自己ホスト型Slackの代替です。Mattermostはファイアウォールの背後での現代的なコミュニケーションです。

プロプライエタリなSaaSメッセージングの代替として、Mattermostはチームのすべてのコミュニケーションを1か所に集約し、検索可能でどこでもアクセス可能にします。

Mattermostは「Slack互換、Slack制限なし」であり、既存のSlack統合との互換性を含む、Slackの受信および送信Webhook統合のスーパーセットをサポートしています。既存のSlackチームから、ユーザー、公開チャンネルの履歴、さらにはテーマ設定の色をMattermostにインポートできます。

このHowToで使用される名前、変数、およびアカウント

サーバーのローカルIP                 : 192.168.2.100  
サーバーのFQDN                     : mattermost.example.com  
Mattermostデータベースの名前        : mattermost  
Mattermostデータベースにアクセスするユーザー : mmuser  
データベース内のmmuserのパスワード: DBAss47slX3

前提条件

このHowtoでは、PostgreSQLをデータベースバックエンドとして使用してCentOS7にMattermostをインストールする方法を説明します。このガイドの目的のために、すべてを単一のサーバーにインストールすることを前提としますが、経験豊富なユーザーにとっては、部品を分解して各コンポーネント(例:データベースサーバー)を別のマシンにインストールするのは簡単です。インストールはユーザーrootで行われましたが、もちろんsudo有効ユーザーを使用することもできます。

また、サーバーのIPアドレスが192.168.2.100であり、DNSがmattermost.example.comに解決されることを前提としています。このHowToのどこでも192.168.2.100またはmattermost.example.comと読んだ場合は、サーバーのIPアドレスに置き換えてください。

開始する前に、CentOS7の最小インストールが必要です。インストール後、メールが正しく設定されていることを確認してください(postfixの設定)、これによりシステムがメールを送信できるようになります(例:スマートホスト経由または同様のソリューション)。

続行する前にいくつかの小さなチェックを行ってください:

サーバーのターミナルからメールを送信してみてください:

[root@mattermost ~]echo -en "Subject: Testmail\n\nThis is a test\n" | sendmail [email protected]

([email protected]をサーバーが送信できるメールアドレスに置き換えてください)。システムからメールを受信したことを確認してください!

mattermost.example.comの名前解決を確認する

別のコンピュータ(設定しようとしているサーバーではない)からmattermost.example.comにpingを試みてください。ポジティブな結果が得られるはずです:

C:\>ping mattermost.example.com  
Pinging mattermost.witron.com [192.168.2.100] with 32 bytes of data:  
Reply from 192.168.2.100: bytes=32 time<1ms TTL=64  
Reply from 192.168.2.100: bytes=32 time<1ms TTL=64  
Reply from 192.168.2.100: bytes=32 time<1ms TTL=64  
Reply from 192.168.2.100: bytes=32 time<1ms TTL=64  
  
Ping statistics for 192.168.2.100:  
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),  
Approximate round trip times in milli-seconds:  
Minimum = 0ms, Maximum = 0ms, Average = 0ms

インターネット接続を確認する

次に、wgetパッケージをインストールします(後で必要になります)。

[root@mattermost ~] yum -y install wget

そして、それを使用して公開IPを確認します。これにより、インターネット接続を確認できます。

[root@mattermost ~] wget http://ipinfo.io/ip -qO -  
46.101.122.124

結果はあなたの公開IPアドレスであるべきです。

ファイアウォールの状態を確認し、今は無効にする

CentOS7のインストールにfirewalldが有効になっているかどうかを確認してください。次のように入力して確認できます。

[root@mattermost ~] systemctl status firewalld

もし次のような表示がされる場合

Active: active (running) since …

無効にするために次の2つのコマンドを実行してください。

[root@mattermost ~] systemctl stop firewalld  
[root@mattermost ~] systemctl disable firewalld

このチュートリアルの最後に、firewalldを再度有効にする方法と、Mattermostと正しく動作するように設定する方法が記載されています。

上記のすべてのチェックに合格した場合、またはこのチュートリアルに適したシステムがあることを知っている場合は、今すぐ続行できます。

PostgreSQLデータベースサーバーのインストール

MattermostのデータベースバックエンドとしてPostgreSQLを使用します。次のコマンドでインストールします:

[root@mattermost ~] yum -y install postgresql-server postgresql-contrib

インストール後、データベースを初期化する必要があります。

[root@mattermost ~] postgresql-setup initdb  
Initializing database ... OK

次にPostgreSQLを起動し、自動起動を有効にします。

[root@mattermost ~]# systemctl start postgresql  
[root@mattermost ~]# systemctl enable postgresql  
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /usr/lib/systemd/system/postgresql.service.

PostgreSQLが実行中であることを確認してください。

[root@mattermost ~]# systemctl status postgresql

次のような報告がされるはずです(テキスト内にActive: active (running)が含まれていることを確認してください)。

? postgresql.service - PostgreSQL database server  
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)  
Active: active (running) since Fri 2016-03-04 11:37:50 CET; 44s ago  
Main PID: 17660 (postgres)  
CGroup: /system.slice/postgresql.service  
??17660 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432  
??17661 postgres: logger process  
??17663 postgres: checkpointer process  
??17664 postgres: writer process  
??17665 postgres: wal writer process  
??17666 postgres: autovacuum launcher process  
??17667 postgres: stats collector process  
  
Mar 04 11:37:48 mattermost systemd[1]: Starting PostgreSQL database server...  
Mar 04 11:37:50 mattermost systemd[1]: Started PostgreSQL database server.  
Mar 04 11:37:59 mattermost systemd[1]: Started PostgreSQL database server.

mattermostデータベースとデータベースユーザーの作成

PostgreSQLは自動的にpostgresという名前のユーザーとグループを作成しました。データベースエンジンに接続し、データベースとそれにアクセスできるユーザーを設定するためにpostgresユーザーを使用します。

postgresユーザーとしてプロンプトを開始します:

[root@mattermost ~]# sudo -i -u postgres

プロンプトが次のように変更されます:

-bash-4.2$

次にデータベースサーバーに接続します。

-bash-4.2$ psql  
psql (9.2.15)  
Type "help" for help.  
postgres=#

PostgreSQLプロンプト内で、’mattermost’という名前のデータベースを作成します。

postgres=# CREATE DATABASE mattermost;  
CREATE DATABASE

次に、パスワード’DBAss47slX3‘を持つユーザー’mmuser‘を作成します。

postgres=# **CREATE USER mmuser WITH PASSWORD '*DBAss47slX3*';  
CREATE ROLE

次のように入力して、ユーザーにMattermostデータベースへのアクセスを付与します:

postgres=# GRANT ALL PRIVILEGES ON DATABASE mattermost to mmuser;  
GRANT  
postgres=#

次に、次のように入力してPostgreSQLプロンプトを終了します:

postgres=# \q  
-bash-4.2$

そして、postgresユーザーとして開始したシェルを次のように終了します:

-bash-4.2$ exit  
logout  
[root@mattermost ~]#

ユーザー名/パスワードを介してlocalhostからPostgreSQLデータベースへのアクセスを許可

後で、私たちのmattermostインスタンスはPostgreSQLデータベースと通信し、ユーザー名とパスワードで認証したいと考えています。これを許可するために、PostgreSQLの設定を少し変更する必要があります。ファイルを開きます:

vi /var/lib/pgsql/data/pg_hba.conf

viやnanoのようなエディタで次の行を変更します:

host    all             all             127.0.0.1/32            ident

次のように変更します:

host    all             all             127.0.0.1/32            md5

ファイルを保存し、次にPostgreSQLを再起動します。

[root@mattermost ~]# systemctl restart postgresql

以前に作成したユーザーとパスワードを使用してデータベースサーバーに接続することで、正しく行ったかどうかを確認する必要があります(サーバーで異なるパスワードを使用した場合は、そのパスワードを使用してください):

[root@mattermost ~]# psql --host=127.0.0.1 --dbname=mattermost --username=mmuser --password  
Password for user mmuser:  
psql (9.2.15)  
Type "help" for help.  
  
mattermost=> \q  
[root@mattermost ~]#

私たちのPostgreSQLサーバーとデータベースは、今やMattermostの準備が整いました!

Mattermostをダウンロードして抽出する

MattermostサーバーのコピーをGithubリポジトリから直接ダウンロードしましょう(このチュートリアル作成時点でのバージョンはv2.0.0でした)。

[root@mattermost ~]# cd  
[root@mattermost ~]# wget -q "https://github.com/mattermost/platform/releases/download/v2.0.0/mattermost.tar.gz" -O mattermost.tar.gz

次に、アーカイブを抽出し、抽出したファイルをターゲットの場所(この場合は/opt/mattermost)に配置します。

[root@mattermost ~]# tar -xvzf mattermost.tar.gz  
[root@mattermost ~]# mv mattermost /opt

Mattermostのインストール

Mattermostデーモンを実行するユーザーを作成

後でMattermostをデーモンとして実行します。したがって、’ mattermost ‘という名前の新しいユーザーをシステムに設定します。後でMattermostインスタンスを実行します。次のコマンドを実行して、システムユーザーとグループ’mattermost‘を作成します:

[root@mattermost ~]# useradd -r mattermost -U -s /sbin/nologin

Mattermostのデータストレージフォルダーを作成

Mattermostは、アップロードされたファイルなどのデータをフォルダーに保存したいと考えています。したがって、そのフォルダーを作成する必要があります。ハードドライブのどこにでも置くことができますが、ユーザー’mattermost‘がアクセスできる必要があります。私は’/opt/mattermost/data’を使用することにしました。次のコマンドでフォルダーを作成します:

[root@mattermost ~]# mkdir -p /opt/mattermost/data

mattermostディレクトリの所有者を設定

次に、mattermostディレクトリのグループと所有者を、以前に作成したユーザーとグループに設定します:

[root@mattermost ~]# chown -R mattermost:mattermost /opt/mattermost  
[root@mattermost ~]# chmod -R g+w /opt/mattermost**

mattermostのデータベース接続を構成

MattermostがPostgreSQLデータベースに接続する方法を指定するために、その設定ファイルを編集する必要があります:

*/opt/mattermost/config/config.json*

‘SqlSettings’セクションを見つけて、私たちのニーズに合わせて変更します:

"SqlSettings": {  
 "DriverName": "mysql",  
 "DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8",  
 "DataSourceReplicas": [],  
 "MaxIdleConns": 10,  
 "MaxOpenConns": 10,  
 "Trace": false,  
 "AtRestEncryptKey": "7rAh6iwQCkV4cA1Gsg3fgGOXJAQ43QVg"  
},

"SqlSettings": {  
 "DriverName": "postgres",  
 "DataSource": "postgres://mmuser:[email protected]:5432/mattermost?sslmode=disable&connect_timeout=10",  
 "DataSourceReplicas": [],  
 "MaxIdleConns": 10,  
 "MaxOpenConns": 10,  
 "Trace": false,  
 "AtRestEncryptKey": "7rAh6iwQCkV4cA1Gsg3fgGOXJAQ43QVg"  
},

AtRestEncryptKeyはそのままで大丈夫です!

mattermostのメール接続を構成

再度、その設定ファイルを編集する必要があります。

*/opt/mattermost/config/config.json*

‘EmailSettings’セクションを見つけて、私たちのニーズに合わせて変更します:

 "EmailSettings": {  
 "EnableSignUpWithEmail": true,  
 "EnableSignInWithEmail": true,  
 "EnableSignInWithUsername": false,  
 "SendEmailNotifications": false,  
 "RequireEmailVerification": false,  
 "FeedbackName": "",  
 "FeedbackEmail": "",  
 "SMTPUsername": "",  
 "SMTPPassword": "",  
 "SMTPServer": "",  
 "SMTPPort": "",  
 "ConnectionSecurity": "",  
 "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",  
 "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",  
 "SendPushNotifications": false,  
 "PushNotificationServer":  
},  

 "EmailSettings": {  
 "EnableSignUpWithEmail": true,  
 "EnableSignInWithEmail": true,  
 "EnableSignInWithUsername": false,  
 "SendEmailNotifications": false,  
 "RequireEmailVerification": false,  
 "FeedbackName": "",  
 "FeedbackEmail": "",  
 "SMTPUsername": "",  
 "SMTPPassword": "",  
 "SMTPServer": "127.0.0.1",  
 "SMTPPort": "25",  
 "ConnectionSecurity": "",  
 "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",  
 "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",  
 "SendPushNotifications": false,  
 "PushNotificationServer": ""  
},  

私たちは127.0.0.1とポート25を使用します。なぜなら、私たちのローカルpostfixインストールがすでに外部にメールを送信できるように設定されているからです。あなたの設定が異なる場合は、正しい値を設定する必要があります!

mattermostを内部インターフェース(127.0.0.1)のみでリッスンするように構成

デフォルトでは、mattermostサーバーインスタンスはすべてのインターフェースでポート8065(:8065)をリッスンします。NginxサーバーをMattermostの前に置きたいので、この動作を変更してlocalhost(127.0.0.1:8065)のみでリッスンするようにします。

次の行を変更します。

        "ListenAddress": ":8065",

次のように変更します。

        "ListenAddress": "127.0.0.1:8065",

config.jsonファイル内で。

Mattermostサーバーをテスト

コマンドラインからMattermostサーバーが起動するかどうかをテストできます。必ずユーザー’mattermost’としてこれを行ってください。誤って’root’としてこれを行った場合は、mattermostフォルダーの権限を再度修正する必要があります!

[root@mattermost ~]# su - mattermost -s /bin/bash  

Last login: Fri Mar 4 12:47:52 CET 2016 on pts/0  
su: warning: cannot change directory to /home/mattermost: No such file or directory  
-bash-4.2$

次に、mattermostインストールディレクトリに移動します:

-bash-4.2$ cd /opt/mattermost/bin/

そして、コマンドラインからmattermostを実行します:

-bash-4.2$ ./platform

出力は次のようになります:

[2016/03/04 13:00:10 CET] [INFO] Loaded system translations for 'en' from '/opt/mattermost/i18n/en.json'  
[2016/03/04 13:00:10 CET] [INFO] Current version is 2.0.0 (5950/Sat Feb 13 15:42:01 UTC 2016/c71c5cef632c7dc68072167c6fe091a60835fa02)  
[2016/03/04 13:00:10 CET] [INFO] Enterprise Enabled: false  
[2016/03/04 13:00:10 CET] [INFO] Current working directory is /opt/mattermost/bin  
[2016/03/04 13:00:10 CET] [INFO] Loaded config file from /opt/mattermost/config/config.json  
[2016/03/04 13:00:10 CET] [INFO] Server is initializing...  
[2016/03/04 13:00:10 CET] [INFO] Pinging sql master database  
[2016/03/04 13:00:10 CET] [INFO] Pinging sql replica-0 database  
[2016/03/04 13:00:10 CET] [DEBG] Deleting any unused pre-release features  
[2016/03/04 13:00:10 CET] [INFO] The database schema has been set to version 2.0.0  
[2016/03/04 13:00:10 CET] [DEBG] Initializing user api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing team api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing channel api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing post api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing web socket api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing file api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing command api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing admin api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing oauth api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing webhook api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing preference api routes  
[2016/03/04 13:00:10 CET] [DEBG] Initializing license api routes  
[2016/03/04 13:00:10 CET] [DEBG] Parsing server templates at /opt/mattermost/api/templates/  
[2016/03/04 13:00:10 CET] [DEBG] Initializing web routes  
[2016/03/04 13:00:10 CET] [DEBG] Using static directory at /opt/mattermost/web/static/  
[2016/03/04 13:00:10 CET] [DEBG] Parsing templates at /opt/mattermost/web/templates/  
[2016/03/04 13:00:10 CET] [INFO] Starting Server...  
[2016/03/04 13:00:10 CET] [INFO] Server is listening on 127.0.0.1:8065  
[2016/03/04 13:00:10 CET] [INFO] RateLimiter is enabled  
[2016/03/04 13:00:10 CET] [DEBG] Checking for security update from Mattermost  
[2016/03/04 13:00:10 CET] [EROR] Failed to get security update information from Mattermost.

MattermostサーバーをCtrl+Cで停止し、次にユーザー’mattermost’として開始したシェルを次のように終了します:

-bash-4.2$ exit  
logout  
[root@mattermost ~]#

もしあなたのmattermostインスタンスが起動しない場合は、出力を注意深く読んでください。私は自分自身がconfig.jsonに単純なカンマを忘れたために多くの問題を抱えました。また、dbuserのパスワードに特別な文字、特に’ @ ‘記号を使用しないことを確認してください。最初はそれが私を困惑させました!

もしあなたが誤って上記のコマンドを’root‘として実行した場合、それも機能するかもしれませんが、mattermostフォルダーの権限を再度修正する必要があります。この間違いに遭遇した場合は、次のコマンドを使用してください:

[root@mattermost ~]# chown -R mattermost:mattermost /opt/mattermost

すべてがうまくいった場合、今すぐ続行できます。

Mattermostをデーモンとして設定

Mattermostをデーモンとして設定するには、次の内容でファイルを作成します。

*/etc/systemd/system/mattermost.service*
[Unit]  
Description=Mattermost  
After=syslog.target network.target  
  
[Service]  
Type=simple  
WorkingDirectory=/opt/mattermost/bin  
User=mattermost  
ExecStart=/opt/mattermost/bin/platform  
PIDFile=/var/spool/mattermost/pid/master.pid  
  
[Install]  
WantedBy=multi-user.target

次に、デーモンファイルをリロードします:

[root@mattermost ~]# systemctl daemon-reload

これで、私たちはこのサービスをstart/stop/enable/disableすることができます。

では、Mattermostを開始し、そのステータスを取得し、サービスとして有効にしましょう(自動起動)。

Mattermostデーモンを開始

[root@mattermost ~]# systemctl start mattermost.service

Mattermostのステータスを確認

[root@mattermost ~]# systemctl status mattermost.service  
? mattermost.service - Mattermost  
Loaded: loaded (/etc/systemd/system/mattermost.service; disabled; vendor preset: disabled)  
 Active: active (running) since Fri 2016-03-04 14:03:40 CET; 4s ago  
Main PID: 18573 (platform)  
CGroup: /system.slice/mattermost.service  
??18573 /opt/mattermost/bin/platform  
...
...

active (running)であることを確認してください!

自動起動のためにデーモンを有効にする

[root@mattermost ~]# systemctl enable mattermost.service  
Created symlink from /etc/systemd/system/multi-user.target.wants/mattermost.service to /etc/systemd/system/mattermost.service.

念のため、次のコマンドを実行してMattermostが127.0.0.1:8065でリッスンしているかどうかをテストします:

[root@mattermost config]# curl -s "http://127.0.0.1:8065" | grep -b "2015 Mattermost"

‘2015 Mattermost’を含む単一行が得られるはずです。

11343:        © 2015 Mattermost, Inc.

そうであれば、Mattermostサーバーインスタンスが実行中であることが確認でき、続行できます。

SELinux関連の権限問題を修正

CentOS7では、SELinuxがデフォルトで有効になっています。完全に無効にすることもできますが、再構成してMattermostサーバーが実行できるようにする方が良いです。

次の2つのコマンドを入力してSELinuxの権限を修正します:

[root@mattermost config]# chcon -Rt httpd_sys_content_t /opt/mattermost/  
[root@mattermost config]# setsebool -P httpd_can_network_connect 1

Nginxサーバーの設定

Mattermostサーバーインスタンスの前にNginxサーバーを置きます。

主な利点は次のとおりです:

  • ポートマッピング :80から:8065
  • 標準リクエストログ
  • 後でSSLに切り替える際のオプションが増える

epelリポジトリを有効にする

NginxはCentOSのデフォルトリポジトリには含まれていません。したがって、最初にepelリポジトリを有効にする必要があります。これは簡単な作業で、次のように入力します:

[root@mattermost config]# yum -y install epel-release && yum update

nginxをインストール

epel-releaseを有効にした後、次のコマンドでnginxを簡単にインストールできます:

[root@mattermost config]# yum -y install nginx

これにより、nginxとそのすべての依存関係がインストールされます。

nginxを構成

Nginxを構成する方法はいくつかあります。このチュートリアルでは、ポート80でMattermostサーバーをホストする非常にシンプルな設定を作成する方法を示します。

Nginxのデフォルト設定ファイルを変更

現在のnginx.confのバックアップを作成するには、次のように実行します:

[root@mattermost config]# cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak

次に、/etc/nginx/nginx.confを次の内容に置き換えます:

# For more information on configuration, see:  
# * Official English Documentation: http://nginx.org/en/docs/  
# * Official Russian Documentation: http://nginx.org/ru/docs/  
  
user nginx;  
worker_processes auto;  
error_log /var/log/nginx/error.log;  
pid /run/nginx.pid;  
  
events {  
 worker_connections 1024;  
}  
  
http {  
 log_format main '$remote_addr - $remote_user [$time_local] "$request" '  
 '$status $body_bytes_sent "$http_referer" '  
 "$http_user_agent" "$http_x_forwarded_for"';  
  
 access_log /var/log/nginx/access.log main;  
  
 sendfile on;  
 tcp_nopush on;  
 tcp_nodelay on;  
 keepalive_timeout 65;  
 types_hash_max_size 2048;  
  
 include /etc/nginx/mime.types;  
 default_type application/octet-stream;  
  
 # Load modular configuration files from the /etc/nginx/conf.d directory.  
 # See http://nginx.org/en/docs/ngx_core_module.html#include  
 # for more information.  
 include /etc/nginx/conf.d/*.conf;  
  
 server {  
 server_name mattermost.example.com;  
 location / {  
 client_max_body_size 50M;  
 proxy_set_header Upgrade $http_upgrade;  
 proxy_set_header Connection "upgrade";  
 proxy_set_header Host $http_host;  
 proxy_set_header X-Real-IP $remote_addr;  
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  
 proxy_set_header X-Forwarded-Proto $scheme;  
 proxy_set_header X-Frame-Options SAMEORIGIN;  
 proxy_pass http://127.0.0.1:8065;  
 }  
 }  
}

この文書で前述の正しいホスト名を使用していることを確認してください。

構成ファイルに構文エラーがないことを確認するために、次のコマンドを実行して構文を確認します:

[root@mattermost config]# nginx -t  
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok  
ginx: configuration file /etc/nginx/nginx.conf test is successful

Nginxをデーモンとして開始および有効化

Nginxを開始

[root@mattermost config]# systemctl start nginx

ステータスを確認

[root@mattermost config]# systemctl status nginx

少なくとも次のような行が出力されることを確認してください:

...  
Active: active (running)...  
...

デーモンとして有効化

[root@mattermost config]# systemctl enable nginx  
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.

すべてがうまくいった場合、Nginxの背後で動作するMattermostインストールができているはずです。次のURLをブラウザで開いて確認してください:

http://mattermost.example.com

Mattermostのログイン画面が表示されるはずです!

Mattermostログイン画面

これで、メールアドレスを入力してアカウントを作成することでMattermostのインストールを続行できます。

Firewalld

このチュートリアルの初めに、firewalldを無効にしました。再度有効にしたいが、ポート80を開いたままにしたい場合(現在Nginx経由でMattermostに使用しているポート)、次のようにします:

Firewalldを開始して再度有効にする

[root@mattermost config]# systemctl start firewalld  
[root@mattermost config]# systemctl enable firewalld  
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.  
Created symlink from /etc/systemd/system/basic.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.

ファイアウォールでポート80を開く

[root@mattermost config]# firewall-cmd --zone=public --add-port=80/tcp --permanent  
success  
[root@mattermost config]# firewall-cmd --reload  
success

これで、Mattermostのインストールは、firewalldが実行されていてもアクセス可能であるはずです!

まとめ

このチュートリアルが役に立ち、うまくいったことを願っています。本番環境では、Mattermostウェブサイトのために証明書を作成/使用し、Nginxを介してhttpsを有効にする必要があります。これは、このHowtoを少し修正することで簡単に実現できます。

Share: X/Twitter LinkedIn

新しい投稿を受信箱で受け取る

スパムはありません。いつでも購読を解除できます。