お疲れ様です。
Zabbix6.0がリリースされたとのことで、AWS上にRed Hat Enterprise Linux 8 + MySQL + Apacheでインストールを行ったのでその環境の備忘録になります。
環境はシンプルに下記のような環境で構築を行っています。
セキュリティがガバガバな環境なので、実環境での利用は非推奨です。
![](https://satimo.org/wp-content/uploads/2022/03/Untitled-16.png)
目次
AWS上に構築するインフラ環境
![](https://satimo.org/wp-content/uploads/2022/03/image-1024x652.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-1-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-2-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-3-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-4-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-5-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-6-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-7-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-8-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-13-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-10-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-11-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-22-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-31.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-21-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-20-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-19-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-26-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-27-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-28-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-29-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-30-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-32-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-33-1024x687.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-1.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-2.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-3.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-4.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-5.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-6.png)
sudo yum update -y
![](https://satimo.org/wp-content/uploads/2022/03/image-7.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-8.png)
sudo rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm
![](https://satimo.org/wp-content/uploads/2022/03/image-9.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-10.png)
sudo dnf clean all
![](https://satimo.org/wp-content/uploads/2022/03/image-12.png)
sudo dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent -y
![](https://satimo.org/wp-content/uploads/2022/03/image-13.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-14.png)
sudo dnf install mysql-server -y
![](https://satimo.org/wp-content/uploads/2022/03/image-15.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-16.png)
sudo systemctl start mysqld
sudo systemctl enable mysqld
![](https://satimo.org/wp-content/uploads/2022/03/image-17.png)
mysql_secure_installation
![](https://satimo.org/wp-content/uploads/2022/03/image-18.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-19.png)
rootのパスワードを設定後はEnterを数回押下して設定を完了します。
![](https://satimo.org/wp-content/uploads/2022/03/image-22.png)
mysql -uroot -p
Enter password:
![](https://satimo.org/wp-content/uploads/2022/03/image-24.png)
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user 'zabbix'@'localhost' identified by zabbixpass;
grant all privileges on zabbix.* to 'zabbix'@'localhost';
quit;
![](https://satimo.org/wp-content/uploads/2022/03/image-25.png)
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by 'zabbixpass';
grant all privileges on zabbix.* to zabbix@localhost;
quit;
![](https://satimo.org/wp-content/uploads/2022/03/image-27.png)
sudo vi /etc/my.cnf.d/mysql-server.cnf
![](https://satimo.org/wp-content/uploads/2022/03/image-28.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-29.png)
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysql/mysqld.log
pid-file=/run/mysqld/mysqld.pid
character-set-server=utf8
![](https://satimo.org/wp-content/uploads/2022/03/image-30.png)
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
![](https://satimo.org/wp-content/uploads/2022/03/image-34.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-37.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-38.png)
sudo vi /etc/zabbix/zabbix_server.conf
![](https://satimo.org/wp-content/uploads/2022/03/image-39.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-40.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-41.png)
sudo vi /etc/php-fpm.d/zabbix.conf
![](https://satimo.org/wp-content/uploads/2022/03/image-53.png)
sudo systemctl restart zabbix-server zabbix-agent httpd php-fpm
sudo systemctl enable zabbix-server zabbix-agent httpd php-fpm
![](https://satimo.org/wp-content/uploads/2022/03/image-42.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-43-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-44-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-45-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-46-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-47-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-48-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-49-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-50-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-51-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-52-1024x687.png)
![](https://satimo.org/wp-content/uploads/2022/03/image-54-1024x517.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-54-1-1024x517.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-54-2-1024x517.jpg)
![](https://satimo.org/wp-content/uploads/2022/03/image-54-3-1024x517.jpg)
コメント