The fastest and most effective deployment zabbix solution with docker

I tried many ways to deploy zabbix, but either the deployed zabbix could not be accessed, or the log error could not find a solution, and finally.

The zabbix3.4 I deployed is in the centos environment, and the data is stored in the mysql5.7 database, and the monitoring data is displayed on the web-nginx page through zabbix -java-gateway as a java monitoring extension .

Then according to this idea, there are the following four steps, copy and paste directly, and you can open it when you access the IP. It is very stable. The success rate is as high as 99%. If you fail to deploy successfully, then don’t blame me. You must be the 1%. Come in order.

1. The database mysql5.7

docker run --name mysql-server -t \
           -e MYSQL_DATABASE="zabbix" \
           -e MYSQL_USER="zabbix" \
           -e MYSQL_PASSWORD="zabbix_pwd" \
           -e MYSQL_ROOT_PASSWORD="root_pwd" \
           -d mysql:5.7

2. Java management plugin

docker run --name zabbix-java-gateway -t \
           -d zabbix/zabbix-java-gateway:centos-3.4-latest

3、zabbix-server

docker run --name zabbix-server-mysql -t \
           -e DB_SERVER_HOST="mysql-server" \
           -e MYSQL_DATABASE="zabbix" \
           -e MYSQL_USER="zabbix" \
           -e MYSQL_PASSWORD="zabbix_pwd" \
           -e MYSQL_ROOT_PASSWORD="root_pwd" \
           -e ZBX_JAVAGATEWAY="zabbix-java-gateway" \
           --link mysql-server:mysql \
           --link zabbix-java-gateway:zabbix-java-gateway \
           -p 10051:10051 \
           -d zabbix/zabbix-server-mysql:centos-3.4-latest

4、web-nginx

docker run --name zabbix-web-nginx-mysql -t \
           -e DB_SERVER_HOST="mysql-server" \
           -e MYSQL_DATABASE="zabbix" \
           -e MYSQL_USER="zabbix" \
           -e MYSQL_PASSWORD="zabbix_pwd" \
           -e MYSQL_ROOT_PASSWORD="root_pwd" \
           --link mysql-server:mysql \
           --link zabbix-server-mysql:zabbix-server \
           -p 80:80 \
           -d zabbix/zabbix-web-nginx-mysql:centos-3.4-latest

Well, according to the order of 1, 2, 3, 4, you can open the browser, enter your own IP, and the zabbix page will appear. Initial account: Admin and initial password: zabbix
(secretly telling you that there was a brainless one before Copy, copy the space and I can’t log in... I can’t log in, see if I dare to type a space when typing the account password.)

Guess you like

Origin blog.csdn.net/weixin_48226988/article/details/108730939