1.安装docker和docker-compose
已有可跳过,没有参照我的docker一件安装脚本连接放在下方
一键安装dockerv24.0.6以及docker-compose可离线_docker 24对应docker-compose-CSDN博客
2.运行zabbix-server
1.创建zabbix工作目录
mkdir /zabbix
2.编写docker-compose
version: "3"
services:postgres:image: postgres:15.7-alpinecontainer_name: zabbix-postgresenvironment:POSTGRES_DB: zabbixPOSTGRES_USER: zabbixPOSTGRES_PASSWORD: srebro.cncommand: -c max_connections=2000restart: alwaysvolumes:- ./postgres_data:/var/lib/postgresql/datanetwork_mode: hostzabbix-server:image: zabbix/zabbix-server-pgsql:7.0-alpine-latest#image: zabbix/zabbix-server-pgsql:7.0-ubuntu-latest-newcontainer_name: zabbix-serverenvironment:DB_SERVER_HOST: 127.0.0.1POSTGRES_USER: zabbixPOSTGRES_PASSWORD: srebro.cnPOSTGRES_DB: zabbixTZ: Asia/Shanghaivolumes:- ./zabbix_alertscripts:/usr/lib/zabbix/alertscriptsnetwork_mode: hostrestart: alwaysdepends_on:- postgreszabbix-web-nginx:image: zabbix/zabbix-web-nginx-pgsql:7.0-alpine-latestcontainer_name: zabbix-web-nginxenvironment:DB_SERVER_HOST: 127.0.0.1POSTGRES_USER: zabbixPOSTGRES_PASSWORD: srebro.cnPOSTGRES_DB: zabbixZBX_SERVER_HOST: 127.0.0.1PHP_TZ: Asia/Shanghainetwork_mode: hostrestart: alwaysdepends_on:- zabbix-server
3.运行docker-compose
docker-compose up -d
1.我遇到的报错
2.解决方法参照我下方链接
docker拉取镜像失败:error pulling image configuration: download failed after attempts=6: dial tcp 74.86.228_docker安装kafka的时候提示error pulling image configuratio-CSDN博客
4.查看容器
docker ps -a
5.登入zabbix控制台
http://10.0.0.110:8080
默认密码: Admin/zabbix