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-alpine
container_name: zabbix-postgres
environment:
POSTGRES_DB: zabbix
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: srebro.cn
command: -c max_connections=2000
restart: always
volumes:
- ./postgres_data:/var/lib/postgresql/data
network_mode: host
zabbix-server:
image: zabbix/zabbix-server-pgsql:7.0-alpine-latest
#image: zabbix/zabbix-server-pgsql:7.0-ubuntu-latest-new
container_name: zabbix-server
environment:
DB_SERVER_HOST: 127.0.0.1
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: srebro.cn
POSTGRES_DB: zabbix
TZ: Asia/Shanghai
volumes:
- ./zabbix_alertscripts:/usr/lib/zabbix/alertscripts
network_mode: host
restart: always
depends_on:
- postgres
zabbix-web-nginx:
image: zabbix/zabbix-web-nginx-pgsql:7.0-alpine-latest
container_name: zabbix-web-nginx
environment:
DB_SERVER_HOST: 127.0.0.1
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: srebro.cn
POSTGRES_DB: zabbix
ZBX_SERVER_HOST: 127.0.0.1
PHP_TZ: Asia/Shanghai
network_mode: host
restart: always
depends_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