当前位置: 首页 > article >正文

docker-compose 安装部署zabbix

1. 使用docker-compose 安装部署zabbix监控?

要求:

① docker-compose文件在/docker-compose目录下

镜像提供地址:

registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/mysql:8.0.39

registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-java-gateway

registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-server-mysql

registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-web-nginx-mysql

registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-agent

创建目录

mkdir /docker-compose
cd /docker-compose

编写配置文件 vim docker-compose.yml

version: '3.8'
networks:
  zabbix-net:
    driver: bridge
services:
  zabbix-server:
    image: registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-server-mysql
    container_name: zabbix-server
    ports:
      - "10051:10051"
    networks:
      - zabbix-net
    environment:
      - DB_SERVER=mysql
      - MYSQL_DATABASE=zabbix
      - MYSQL_USER=zabbix
      - MYSQL_PASSWORD=Aa123456!
      - MYSQL_ROOT_PASSWORD=Aa123456!
      - DB_SERVER_HOST=mysql
      - DB_SERVER_PORT=3306
    volumes:
      - /etc/localtime:/etc/localtime:ro
    depends_on:
      - mysql

  zabbix-web:
    image: registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-web-nginx-mysql
    container_name: zabbix-web
    ports:
      - "80:8080"
    networks:
      - zabbix-net
    environment:
      - ZBX_SERVER_HOST=zabbix-server
      - DB_SERVER=mysql
      - MYSQL_DATABASE=zabbix
      - MYSQL_USER=zabbix
      - MYSQL_PASSWORD=Aa123456!
      - MYSQL_ROOT_PASSWORD=Aa123456!
      - DB_SERVER_HOST=mysql
      - DB_SERVER_PORT=3306
    depends_on:
      - zabbix-server

  mysql:
    image: registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/mysql:8.0.39
    container_name: mysql
    ports:
      - "3306:3306"
    networks:
      - zabbix-net
    environment:
      - MYSQL_DATABASE=zabbix
      - MYSQL_USER=zabbix
      - MYSQL_PASSWORD=Aa123456!
      - MYSQL_ROOT_PASSWORD=Aa123456!
    volumes:
      - /docker-compose/mysql/data:/var/lib/mysql

  zabbix-java-gateway:
    image: registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-java-gateway
    container_name: zabbix-java-gateway
    networks:
      - zabbix-net

  zabbix-agent:
    image: registry.cn-shanghai.aliyuncs.com/aliyun_lqkhn/zabbix-agent
    container_name: zabbix-agent
    ports:
      - "10050:10050"
    networks:
      - zabbix-net
    environment:
      - ZBX_SERVER_HOST=zabbix-server
      - ZBX_SERVER_PORT=10051
    volumes:
      - /etc/localtime:/etc/localtime:ro

启动

docker-compose up -d

http://www.kler.cn/a/430578.html

相关文章:

  • 【ES6复习笔记】解构赋值(2)
  • 牛客周赛73B:JAVA
  • AIGC:生成图像动力学
  • 【唐叔学算法】第19天:交换排序-冒泡排序与快速排序的深度解析及Java实现
  • 5.近实时数仓数据更新和ID 管理上的优化方案
  • 攻防世界 cookie
  • 2024年发布的多模态大语言模型和它们采用的设计方法
  • RabbitMQ如何保证消息不被重复消费
  • zookeeper 搭建集群
  • 理解 CAP 理论:分布式系统中的权衡与选择 | 常用组件中的CP和AP
  • 48 基于单片机的LCD12864时间调控和串口抱站
  • 阿里云函数计算助力AI大模型快速部署
  • 孚盟云 MailAjax.ashx SQL注入漏洞复现
  • 解决 GitHub 22 端口被占用,改用 443 端口连接
  • 优化移动端H5:常见问题与解决方案
  • easyExcel实现表头批注
  • Plugin [id: ‘flutter‘] was not found in any of the following sources解决方法
  • FPGA 16 ,Verilog中的位宽:深入理解与应用
  • CVE-2021-25646:Apache Druid远程命令执行漏洞复现
  • Oracle RAC开启和关闭日志归档Log Archive
  • Docker实践和应用详解
  • DApp开发中的测试与调试方法详解
  • 「Mac畅玩鸿蒙与硬件43」UI互动应用篇20 - 闪烁按钮效果
  • MySQL 数据库底层原理解析
  • 【Vulkan入门】08-CreateRenderPass
  • 第四学期-智能数据分析-期末复习题