使用docker-compose部署zabbix4.4

注意:此文适合zabbix4.4版本 

version: "3"
services:
  zabbix-server:
    image: zabbix/zabbix-server-mysql:alpine-4.4-latest
    environment:
      - DB_SERVER_HOST=192.168.100.101
      - DB_SERVER_PORT=3306
      - MYSQL_USER=root
      - MYSQL_PASSWORD=root
      - MYSQL_DATABASE=zabbix
    ports:
      - 10051:10051
    volumes:
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
      - /docker/data/zabbix/zabbix-server:/data
  zabbix-web:
    image: zabbix/zabbix-web-nginx-mysql:alpine-4.4-latest
    environment:
      - DB_SERVER_HOST=192.168.100.101
      - DB_SERVER_PORT=3306
      - MYSQL_USER=root
      - MYSQL_PASSWORD=root
      - MYSQL_DATABASE=zabbix
      - PHP_TZ="Asia/Shanghai"
    ports:
      - 10005:80
    volumes:
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
      - /docker/data/zabbix/fonts/simkai.ttf:/usr/share/zabbix/assets/fonts/DejaVuSans.ttf
      - /docker/data/zabbix/zabbix-web:/data
    depends_on:
      - zabbix-server

注意:修复字体问题,需要先把中文字体simkai.ttf放到此目录:

/docker/data/zabbix/fonts/simkai.ttf

使用docker-compose部署zabbix4.4_第1张图片

添加主机

下载agent:

wget http://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-agent-4.4.1-1.el7.x86_64.rpm

安装:rpm -ivh zabbix-agent-4.4.1-1.el7.x86_64.rpm

启动:

systemctl start zabbix-agent.service

systemctl enable zabbix-agent.service

 

 

你可能感兴趣的:(zabbix,docker)