AWSにmattermostをインストールしてみた

Amazon Linux 2 AMI (HVM), SSD Volume Typeにmattermostをインストールしてみた

このドキュメント通りにやってみた結果、
https://docs.mattermost.com/install/install-rhel-71.html

あっさり動いたw

日本語もいけるっぽい

スマホアプリからも!

Mac Desctop Appまでも!

ssh -i aws.pem ec2-user@ec2–XX–XX–XX–XX.ap-northeast-1.compute.amazonaws.com

sudo yum update
sudo yum upgrade

##
## Installing Mysql Server
##
wget http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
sudo yum localinstall mysql57-community-release-el7–9.noarch.rpm
sudo yum install mysql-community-server
sudo systemctl start mysqld.service

sudo grep ‘temporary password’ /var/log/mysqld.log

mysql -u root -p
mysql> 
ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘mysqlRootPassword!’;

sudo systemctl enable mysqld

mysql> 
create user ‘mmuser’@’%’ identified by ‘XXXXXXXXXXXXX’;
create database mattermost;
grant all privileges on mattermost.* to ‘mmuser’@’%’;

##
## Installing Mattermost Server
##
wget https://releases.mattermost.com/5.6.2/mattermost-5.6.2-linux-amd64.tar.gz
tar -xvzf *.gz
sudo mv mattermost /opt
sudo mkdir /opt/mattermost/data

sudo useradd — system — user-group mattermost
sudo chown -R mattermost:mattermost /opt/mattermost
sudo chmod -R g+w /opt/mattermost
sudo vi /opt/mattermost/config/config.json
..
..

cd /opt/mattermost
sudo -u mattermost ./bin/mattermost
-> “Server is listening on [::]:8065”

sudo touch /etc/systemd/system/mattermost.service
sudo vi /etc/systemd/system/mattermost.service
 — — — — — — — — — — — -
[Unit]
Description=Mattermost
After=syslog.target network.target mysql.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
 — — — — — — — — — — — -

sudo chmod 664 /etc/systemd/system/mattermost.service
sudo systemctl daemon-reload
sudo systemctl enable mattermost
sudo systemctl start mattermost
curl http://localhost:8065