docker 安装部署 zabbix

安装:

# 安装 zabbix server
docker run --name zabbix-server-mysql -t \
       -e DB_SERVER_HOST="172.17.0.1" \
       -e MYSQL_DATABASE="zabbix" \
       -e MYSQL_USER="zabbix" \
       -e MYSQL_PASSWORD="zabbix" \
       -p 172.17.0.1:10051:10051 \
       -d zabbix/zabbix-server-mysql:5.4-alpine-latest

# 安装 zabbix web
docker run --name zabbix-web-nginx-mysql -t \
       -e DB_SERVER_HOST="172.17.0.1" \
       -e MYSQL_DATABASE="zabbix" \
       -e MYSQL_USER="zabbix" \
       -e MYSQL_PASSWORD="zabbix" \
       --link zabbix-server-mysql:zabbix-server \
      -p 172.17.0.1:8080:8080 \
      -d zabbix/zabbix-web-nginx-mysql:alpine-5.4-latest

删除:

docker stop zabbix-server-mysql
docker container rm zabbix-server-mysql

docker stop zabbix-web-nginx-mysql
docker container rm zabbix-web-nginx-mysql