Operations 5 min read

Offline Docker Deployment of Zabbix on a Domestic Kirin System

This guide explains how to export Docker images for MySQL and Zabbix components, transfer and load them on an offline Kirin production server, and then run MySQL, Zabbix Java gateway, Zabbix server, and Zabbix web containers with the necessary configuration and linking.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Offline Docker Deployment of Zabbix on a Domestic Kirin System

The production environment runs on a domestic Kirin operating system, requiring offline deployment of Docker image packages.

docker save -o mysql5.7_4.25.tar skydaiji/mysql

docker save -o zabbix-java-gateway_4.25.tar zabbix/zabbix-java-gateway

docker save -o zabbix-server-mysql_4.25.tar skydaiji/zabbix-server-mysql

docker save -o zabbix-web-nginx-mysql_4.25.tar

Transfer the image tar files to the online server and load them:

docker load -i mysql5.7_4.25.tar

docker load -i zabbix-server-mysql_4.25.tar

docker load -i zabbix-web-nginx-mysql_4.25.tar

docker load -i zabbix-java-gateway_4.25.tar

1. Install MySQL

docker run --name mysql-server -t \ -e MYSQL_DATABASE="zabbix" \ -e MYSQL_USER="zabbix" \ -e MYSQL_PASSWORD="zabbix" \ -e MYSQL_ROOT_PASSWORD="123456" \ -v /etc/localtime:/etc/localtime \ -v /data/zabbix/mysql:/var/lib/mysql \ -d skydaiji/mysql:5.7 \ --character-set-server=utf8 --collation-server=utf8_bin

2. Install Zabbix Java Gateway

docker run --name zabbix-java-gateway -t \ --hostname zabbix-java-gateway \ --restart=always \ -d zabbix/zabbix-java-gateway:alpine-4.2.5

3. Install Zabbix Server (MySQL backend)

docker run --name zabbix-server-mysql -t \ -e DB_SERVER_HOST="mysql-server" \ -e MYSQL_DATABASE="zabbix" \ -e MYSQL_USER="zabbix" \ -e MYSQL_PASSWORD="zabbix" \ -e MYSQL_ROOT_PASSWORD="123456" \ -e ZBX_JAVAGATEWAY="zabbix-java-gateway" \ -e ZBX_JAVAGATEWAY_ENABLE="true" \ --link mysql-server:mysql \ --link zabbix-java-gateway:zabbix-java-gateway \ -v /etc/localtime:/etc/localtime \ -p 10051:10051 \ -v /data/zabbix/alertscripts:/usr/lib/zabbix/alertscripts \ -d skydaiji/zabbix-server-mysql:4.2.5

4. Install Zabbix Web (NGINX)

docker run --name zabbix-web-nginx-mysql -t \ -e DB_SERVER_HOST="mysql-server" \ -e MYSQL_DATABASE="zabbix" \ -e MYSQL_USER="zabbix" \ -e MYSQL_PASSWORD="zabbix" \ -e PHP_TZ="Asia/Shanghai" \ -e MYSQL_ROOT_PASSWORD="123456" \ --link mysql-server:mysql \ --link zabbix-server-mysql:zabbix-server \ -p 80:80 \ -d skydaiji/zabbix-web-nginx-mysql:4.2.5

Verify the containers are running:

docker ps -a

Deployment completed.

DockeroperationscontainerMySQLZabbixoffline deployment
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.