How to setup Zabbix 4 using Docker

docker network create newbridge

docker run --name zabbix-db \
-e MYSQL_ROOT_PASSWORD=password \
-e MYSQL_USER='zabbix' \
-e MYSQL_PASSWORD='password' \
-v /home/ec2-user/db:/var/lib/mysql \
-e MYSQL_DATABASE=zabbix \
--network=newbridge \
--restart=unless-stopped -d mysql:latest \
--character-set-server=utf8 --collation-server=utf8_bin

docker exec -it zabbix-db mysql 
-uroot \
-ppassword mysql \
-e "alter user 'zabbix'@'%' identified with mysql_native_password by 'password';"

docker run --name zabbix-server \
-t \
-e DB_SERVER_HOST='zabbix-db' \
-e MYSQL_USER='zabbix' \
-e MYSQL_PASSWORD='password' \
-p 10050:10050 \
-p 10051:10051 \
--restart=unless-stopped \
--network=newbridge \
-d zabbix/zabbix-server-mysql:latest

docker run --name zabbix-web \
-t \
-e DB_SERVER_HOST='zabbix-db' \
-e MYSQL_USER='zabbix' \
-e MYSQL_PASSWORD='password' \
-e ZBX_SERVER_HOST='zabbix-server' \
-e PHP_TZ='Africa/Lagos' \
-p 80:80 \
--restart=unless-stopped \
--network=newbridge \
-d zabbix/zabbix-web-apache-mysql:latest

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


Keep up, get in touch.

Follow

Instagram / Facebook

Designed with WordPress