zoukankan      html  css  js  c++  java
  • zabbix-docker安装

    创建目录/data/zabbix

    新建docker-compose.yml文件,执行docker-compose up -d

     启动后数据库异常的话删掉zabbix库等server重新创建

    version: '3'
    services:

      zabbix_mysql:
        container_name: "zabbix_mysql"
        restart: "always"
        image: mariadb
        ports:
          - "13306:3306"
        volumes:
          - /data/docker/mysql-data:/var/lib/mysql
          - /etc/localtime:/etc/localtime:ro
        environment:
          MYSQL_ROOT_PASSWORD: "mysqlpss123"
          MYSQL_USER: "zabbix"
          MYSQL_PASSWORD: "mysqlpss123"
          MYSQL_DATABASE: "zabbix"

      zabbix_server:
        container_name: "zabbix_server"
        restart: "always"
        image: zabbix/zabbix-server-mysql
        ports:
          - "10051:10051"
        volumes:
          - /etc/localtime:/etc/localtime:ro
          - /data/docker/zabbix:/usr/lib/zabbix
        depends_on:
          - zabbix_mysql
        links:
          - zabbix_mysql:mysql
        environment:
          DB_SERVER_HOST: "mysql"
          MYSQL_USER: "zabbix"
          MYSQL_DATABASE: "zabbix"
          MYSQL_PASSWORD: "mysqlpss123"

      zabbix_nginx_web:
        container_name: "zabbix_nginx_web"
        restart: "always"
        image: zabbix/zabbix-web-nginx-mysql
        ports:
          - "1443:443"
          - "9800:8080"
        volumes:
          - /etc/localtime:/etc/localtime:ro
        depends_on:
          - zabbix_mysql
          - zabbix_server
        links:
          - zabbix_mysql:mysql
          - zabbix_server:zabbix_server
        environment:
          DB_SERVER_HOST: "mysql"
          MYSQL_USER: "zabbix"
          MYSQL_PASSWORD: "mysqlpss123"
          MYSQL_DATABASE: "zabbix"
          ZBX_SERVER_HOST: "zabbix_server"
          PHP_TZ: "Asia/Shanghai"
      zabbix-agent-a:
        image: zabbix/zabbix-agent
        links:
          - zabbix_server:zabbix_server
        container_name: zabbix-agent-a
        restart: always
        volumes:
          - /etc/localtime:/etc/localtime
        depends_on:
          - zabbix_server
        environment:
          - ZBX_HOSTNAME=zabbix-agent-a  
          - ZBX_SERVER_HOST=zabbix_server

  • 相关阅读:
    20160405小结
    [HTML表格]在databases显示行的附加信息
    [django]django+datatable简单运用于表格中
    [django]django xlrd处理xls中日期转换问题
    烦!
    【数据库】Navicat Premium12远程连接MySQL数据库
    关于定义变量名为"name"的坑!!!
    【前端】前端面试题整理
    Firebug控制台详解
    什么是跨域?跨域解决方法
  • 原文地址:https://www.cnblogs.com/lazy-sang/p/13433474.html
Copyright © 2011-2022 走看看