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.
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.tarTransfer the image tar files to the online server and load them:
docker load -i mysql5.7_4.25.tardocker load -i zabbix-server-mysql_4.25.tardocker load -i zabbix-web-nginx-mysql_4.25.tardocker load -i zabbix-java-gateway_4.25.tar1. 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_bin2. 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.53. 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.54. 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.5Verify the containers are running:
docker ps -aDeployment completed.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
