1.安装环境准备
| 类型 | 内容 |
|---|---|
| CPU | 建议不低于8核虚机或者服务器,最好在16核以上 |
| 存储 | 存储不少于500GB |
| 内存 | 内存不低于8GB,建议16GB以上 |
检查内容
- 关闭防火墙
- 主机名检查
- /etc/security/limit.conf检查
- 系统参数检查
- 磁盘目录检查
2.配置参数说明
- 确认hostname
执行 hostname 命令- 修改 hosts 文件
vim /etc/hosts 192.168.2.100 <主机名> - 解压安装包
tar -zxvf zcbus.simple_server.docker.v2.0.1.aarch64.v1.plus.mysql.tar.gz tar -zxvf zcbus.simple_server.docker.v2.0.1.aarch64.v2.plus.mysql.tar.gz - zcbus.properties配置说明
- 注意修改ZC_MEMORY_LIMIT参数,修改为目前可用的最大内存即可
若无需要调整的配置,使用默认配置文件即可
#-------------------------------------------------------------------------------
# Minimum memory required before install continues. A number plus G.
# Allowed minimum is 4G. 8G or more is recommended.
# Example: 8G
####################################################################
## Copyright(c) ZCBUS Corporation 2022. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
## IMPORTANT NOTE: This file should be secured to have read ##
## permission only by the zcbus user or an administrator who ##
## own this installation to protect any sensitive input values. ##
## ##
####################################################################
#-------------------------------------------------------------------------------
# Data directory for runtime files, container volumes, cache, and logs.
# Fill an absolute path. Keep at least ZC_DATA_DIR_LIMIT free on that disk.
# Example: /data/docker02
#-------------------------------------------------------------------------------
ZC_DATA_HOME=/data/docker02
#-------------------------------------------------------------------------------
# Docker data root, used for images and container storage.
# Fill an absolute path. Keep at least ZC_DOCKER_DIR_LIMIT free.
# Example: /data/docker
#-------------------------------------------------------------------------------
ZC_DOCKER_HOME=/data/docker
#-------------------------------------------------------------------------------
# Linux user that owns the runtime files. Letters, digits, and underscore only.
# Example: zcbus
#-------------------------------------------------------------------------------
ZC_DOCKER_USER=zcbus
#-------------------------------------------------------------------------------
# Installation mode. Allowed values:
# server full single-node server with web UI. This is the usual choice.
# serverv2 server without the web UI.
# server_full server plus monitoring containers.
# server_compute server plus the storage compute service.
# cloud_server cloud server node.
# cloud_client cloud client. Register this machine before install.
# cloud_push cloud push node.
# client local client.
# client_full client plus monitoring containers.
# simple_client lightweight client.
# Example: server
#-------------------------------------------------------------------------------
ZC_TYPE=server
#-------------------------------------------------------------------------------
# Whether this server also runs the storage compute service.
# Allowed: true false. Use true only when this node should start zcbusstorage.
# Example: false
#-------------------------------------------------------------------------------
ZC_STORAGE_ENABLED=false
#-------------------------------------------------------------------------------
# Host port published for the web entry. Integer from 1 to 65535.
# Example: 8899
#-------------------------------------------------------------------------------
ZC_DOCKER_SERVER_PORT=8899
#-------------------------------------------------------------------------------
# Address of the ZCBUS customer or registration API.
# Must start with http:// or https://.
# Example: http://v2.zbomc.com
#-------------------------------------------------------------------------------
ZC_CUSTOMER_URL=http://v2.zbomc.com
#-------------------------------------------------------------------------------
# Messaging service. Fill one of the two public values:
# zbmq built-in ZBMQ for a single node. Installs container zcbuscache.
# This is the same internal mode as zcbus_cache.
# kafka Kafka for cluster mode. Installs zcbuszookeeper and zcbuskafka.
# This is the same internal mode as zcbus_kafka.
# Older names zcbus_cache, zcbus_kafka, and kafka_cache are still accepted
# and are rewritten to zbmq or kafka during install.
# Example: zbmq
#-------------------------------------------------------------------------------
ZC_CACHE_TYPE=zbmq
#-------------------------------------------------------------------------------
# Address where services read and write the message stream. Format: host:port.
# zbmq: use the built-in cache name, usually zcbuscache:6600.
# kafka: use the Kafka broker, for example zcbuskafka:9092 or an external host:port.
# Example: zcbuscache:6600
#-------------------------------------------------------------------------------
ZC_CACHE_SERVER=zcbuscache:6600
#-------------------------------------------------------------------------------
# Database engine for the ZCBUS management database.
# Allowed: mysql postgresql.
# mysql uses internal port 3306. postgresql uses internal port 5432.
# Example: mysql
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# External MySQL, only when ZC_METHOD=external:
# set ZC_SERV_LOCALTION to 1, 2, or 3.
# HOST and PORT must be the real MySQL address, not zcbusnet, zcbusdb, or localhost.
# USER and PWD stay encrypted. Install decrypts them and loads schema and seed data once.
# The account must be able to create tables. Create the empty database first if it cannot.
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_TYPE=mysql
#-------------------------------------------------------------------------------
# Management database name. Letters, digits, and underscore.
# Example: zcbus
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_DBNAME=zcbus
#-------------------------------------------------------------------------------
# Database host seen from the other containers.
# integrate: use zcbusnet. The local database is reached through the net service.
# external: use the real database IP or hostname. Do not use zcbusnet, zcbusdb, or localhost.
# Example: zcbusnet
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_HOST=zcbusnet
#-------------------------------------------------------------------------------
# Database port published by zcbusnet, or the external database port.
# Integer from 1 to 65535. MySQL package default is 33060. PostgreSQL package default is 4400.
# Example: 33060
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_PORT=33060
#-------------------------------------------------------------------------------
# Database user. Fill the pwd_encode encrypted string, not the plain user name.
# Install decrypts it before connecting. Do not leave this empty.
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_USER=QFlYT0k6
#-------------------------------------------------------------------------------
# Database password. Fill the pwd_encode encrypted string, not the plain password.
# Install decrypts it before connecting. Do not leave this empty.
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_PWD=e0twWGp8aVtWfGB8dn9YdTo
#-------------------------------------------------------------------------------
# Numeric id of this database server inside the cluster. Integer >= 1.
# Use 1 for the first server and a different number for each added server.
# Example: 2
#-------------------------------------------------------------------------------
ZC_NET_DB_SERVER_ID=2
#-------------------------------------------------------------------------------
# Install profile passed to the application containers. Integer >= 0.
# 0 is the normal install. Do not use a blank value or -1.
# Example: 0
#-------------------------------------------------------------------------------
ZC_INSTALL_MODE=0
#-------------------------------------------------------------------------------
# Direct database address used by init and client tools. Format: host:port.
# integrate MySQL: zcbusdb:3306. integrate PostgreSQL: zcbusdb:5432.
# external: the real database host and port.
# Example: zcbusdb:3306
#-------------------------------------------------------------------------------
ZC_DB_IPPORT=zcbusdb:3306
#-------------------------------------------------------------------------------
# Host names or IPs of the ZCBUS service nodes. One name, or several separated by commas.
# Integrated install uses zcbusdb. Do not leave this empty.
# Example: zcbusdb
#-------------------------------------------------------------------------------
ZC_NODE_IPS=zcbusdb
#-------------------------------------------------------------------------------
# Where the management database runs.
# integrate install and start the local database container. Use with ZC_SERV_LOCALTION=0.
# external use an existing database. Fill the real host, port, user, and password above.
# Example: integrate
#-------------------------------------------------------------------------------
ZC_METHOD=integrate
#-------------------------------------------------------------------------------
# Which services are started on this machine. Allowed: 0 1 2 3.
# 0 all local services. Use this with ZC_METHOD=integrate.
# 1 external layout: local web and API only.
# 2 external layout: local web, API, and database.
# 3 external layout: local web, API, and Kafka or ZBMQ.
# Example: 0
#-------------------------------------------------------------------------------
ZC_SERV_LOCALTION=0
#-------------------------------------------------------------------------------
# Company code written into the initial data. Integer >= 0.
# Example: 1
#-------------------------------------------------------------------------------
ZC_COM_CODE=1
#-------------------------------------------------------------------------------
# Web access protocol. Allowed: http https.
# Example: http
#-------------------------------------------------------------------------------
ZC_HTTP_MODE=http
#-------------------------------------------------------------------------------
# Kafka SASL authentication. Allowed: 0 1.
# 0 no SASL. Use this for zbmq and for Kafka without SASL.
# 1 enable SASL. Use only when ZC_CACHE_TYPE=kafka and the broker requires SASL.
# Example: 0
#-------------------------------------------------------------------------------
ZC_CACHE_SASL=0
#-------------------------------------------------------------------------------
# Whether install adds the default zcbus service container after the base services start.
# Allowed: 1 add it, 0 do not add it.
# Example: 1
#-------------------------------------------------------------------------------
ZC_IF_ADD_DEFAULT_ZCBUS=1
#-------------------------------------------------------------------------------
# Minimum free space required on ZC_DATA_HOME. A number plus G or M.
# Example: 10G
#-------------------------------------------------------------------------------
ZC_DATA_DIR_LIMIT=10G
#-------------------------------------------------------------------------------
# Minimum free space required on ZC_DOCKER_HOME. A number plus G or M.
# Example: 5G
#-------------------------------------------------------------------------------
ZC_DOCKER_DIR_LIMIT=5G
#-------------------------------------------------------------------------------
# Minimum memory required before install continues. A number plus G.
# Allowed minimum is 4G. 8G or more is recommended.
# Example: 8G
#-------------------------------------------------------------------------------
ZC_MEMORY_LIMIT=4G
#-------------------------------------------------------------------------------
# Whether zcbusnet is exposed through the local proxy process.
# Allowed: 0 disabled, 1 enabled.
# Example: 0
#-------------------------------------------------------------------------------
ZC_NET_PROXY=0
#-------------------------------------------------------------------------------
# Listen port of the net proxy. Integer from 1 to 65535. Used when ZC_NET_PROXY=1.
# Example: 3311
#-------------------------------------------------------------------------------
ZC_NET_PROXY_PORT=3311
#-------------------------------------------------------------------------------
# Proxy user. Fill the pwd_encode encrypted string. Used when ZC_NET_PROXY=1.
#-------------------------------------------------------------------------------
ZC_NET_PROXY_USER=QFkKCzo
#-------------------------------------------------------------------------------
# Proxy password. Fill the pwd_encode encrypted string. Used when ZC_NET_PROXY=1.
#-------------------------------------------------------------------------------
ZC_NET_PROXY_PWD=QFkKC2p6SUlNCkheOg
#-------------------------------------------------------------------------------
# Proxy connection pool size. Integer >= 1. Used when ZC_NET_PROXY=1.
# Example: 128
#-------------------------------------------------------------------------------
ZC_NET_PROXY_POOL=128
#-------------------------------------------------------------------------------
# Number of proxy processes. Integer >= 1. Used when ZC_NET_PROXY=1.
# Example: 1
#-------------------------------------------------------------------------------
ZC_NET_PROXY_PROCESS=1
3.安装过程
[root@zc201 simple_server]# ./zcmgr.sh install
[INFO] Installation log: /tmp/zcbus-install-20260813-104513-27796.log
[OK] Memory check passed: require 4G, available 6G
[INFO] Validating /data/soft/simple_server/common/zcbus.properties
[ZC_TYPE] Validating value 'server' against allowed list: cloud_client simple_client server cloud_server
[ZC_CACHE_TYPE] Validating value 'zcbus_cache' against allowed list: zcbus_cache zcbus_kafka
[ZC_NET_DB_SERVER_TYPE] Validating value 'mysql' against allowed list: postgresql mysql
[ZC_METHOD] Validating value 'integrate' against allowed list: integrate external
[ZC_SERV_LOCALTION] Validating value '0' against allowed list: 0 1 2 3
[ZC_HTTP_MODE] Validating value 'http' against allowed list: http https
[ZC_CACHE_SASL] Validating value '0' against allowed list: 0 1
[ZC_IF_ADD_DEFAULT_ZCBUS] Validating value '1' against allowed list: 0 1
[ZC_NET_PROXY] Validating value '0' against allowed list: 0 1
Configuration file validation passed!
===========================================================/data/soft/simple_server/common/auto_config_hosts.sh============================================================================
==Starting SWAP status check...
==Current SWAP details:
NAME TYPE SIZE USED PRIO
/dev/dm-1 partition 2G 306.8M -2
==[Step 1] Auto-detecting physical NIC IP address...
==Scanning non-virtual NICs, excluding loopback/link-local addresses...
==Final selected physical NIC IP address: 192.168.2.201
==========================================
==Starting to check and configure host info
==----------------------------------------
==Physical NIC IP (auto-detected): 192.168.2.201
==Target Hostname (user-specified): zc201
==========================================
==[Check Item 1] System hostname configuration
==Expected hostname: zc201
==Current hostname: zc201
==No modification needed
==[Check Item 2] Forbid 127.0.0.1 mapping to target hostname
==Checking for illegal mapping of 127.0.0.1 to zc201...
==No illegal mapping found, check passed
==
==[Check Item 3] Auto-configure /etc/hosts IP-hostname mapping
==Target mapping: 192.168.2.201 <-> zc201
==Backed up /etc/hosts to: /etc/hosts.backup.20260813104514
==Skipped - mapping already exists in /etc/hosts
==========================================
==Physical IP Address: 192.168.2.201
==Target Hostname: zc201
==----------------------------------------
==All configuration items completed successfully!
==Host configuration check/auto-configuration finished!
==================================================================================================================================================================
Start ZCBUS installation? [y/N]: y
Install language [0=Chinese, 1=English, default 0]:
Database type [mysql/postgresql, default mysql]:
Install method [integrate/external, default integrate]:
[INFO] Available modes: server, serverv2, server_full, server_compute, cloud_server, client, client_full, cloud_client, cloud_push
Install mode [server]:
[1/8] Validate installation configuration
[OK] Pre-flight image check passed: 7 image(s) ready
[2/8] Check operating system requirements
[INFO] Starting SWAP status check...
[WARN] Detected SWAP is enabled!
NAME TYPE SIZE USED PRIO
/dev/dm-1 partition 2G 306.8M -2
[INFO] 192.168.2.201 zc201
[3/8] Prepare data directory and runtime user
Data directory [/data/docker02]:
[INFO] Load Path to /data/docker02 ...
[OK] Disk space check passed for /data/docker02: require 10G, available 90G
[INFO] Used user's pwd for default pwd
[4/8] Check Docker environment
[OK] Disk space check passed for /data/docker: require 5G, available 90G
[5/8] Check and load container images
Load local container images? [Y/n]: y
[WARN] Load images to docker's failed ...
Redirecting to /bin/systemctl restart docker.service
[OK] Docker images loaded: 7/7
c4d19aff7fcafa0e1bad2cbb0c4fde7bd82370cd5f08ac34f9fe1d06df0808f5
[6/8] Generate service configuration
====mode :server,file=docker-compose-server.yml.jinja
====mode :zcbus_cache,file=zcbus-cache-mq-priv.yml.jinja
trusting_hodgkin
[OK] Service configuration generated for server
[OK] Generated compose image check passed: 6 image(s) ready
[INFO] Checking service ports
[7/8] Initialize and start services
[WARN] docker zcbusdb check failed and retry 1 seconds ...
[+] Running 1/1
✔ Container zcbusdb Started 2.2s
[INFO] docker zcbusdb up sucessfull...
[WARN] docker zcbusnet check failed and retry 1 seconds ...
[+] Running 1/1
✔ Container zcbusnet Started 11.0s
[INFO] docker zcbusnet up sucessfull...
[INFO] Check zcbusdb Connect Failed ,wait 30 seconds and retry 1 times ...
[INFO] docker zcbusnet up sucessfull...
zcbus_docker is Stopping ...
kill -9 12172...
kill -9 12199...
kill -9 12923...
zcbus_docker is Finished ...
zcbus_docker is Stopping ...
zcbus_docker is Finished ...
[INFO] Adding default ZCBUS container in /data/docker02
no such service: zcbus
====mode :zcbus_default,file=zcbus-server-zcbus.yml.jinja
elegant_ganguly
[OK] Generated compose image check passed: 6 image(s) ready
[INFO] docker zcbusnet up sucessfull...
====>>>ZCBUS [ Thu Aug 13 10:47:54 CST 2026 ]
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
zcbus reg.zbomc.com/zcbus_server:v2.0.1 "/bin/bash -c ${ZCBU…" zcbus 1 second ago Up Less than a second
zcbusdb reg.zbomc.com/zcbus_mysql:v2.0.1 "docker-entrypoint.s…" zcbusdb About a minute ago Up 45 seconds 3306/tcp, 33060/tcp
zcbusnet reg.zbomc.com/zcbus_server:v2.0.1 "/bin/bash -c ${ZCBU…" zcbusnet About a minute ago Up 52 seconds 0.0.0.0:33060->33060/tcp, :::33060->33060/tcp
root 2767 1 0 10:47 pts/0 00:00:00 /data/docker02/bin/zcbus_docker -log_level 2
root 2792 1 0 10:47 pts/0 00:00:00 /data/docker02/bin/zcbus_docker -manager -log_level 2
root 3056 1 1 10:47 pts/0 00:00:00 /data/docker02/bin/zcbus_docker -listener -log_level 2
[8/8] Verify installation result
====>>>ZCBUS [ Thu Aug 13 10:48:06 CST 2026 ]
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
zcbus reg.zbomc.com/zcbus_server:v2.0.1 "/bin/bash -c ${ZCBU…" zcbus 13 seconds ago Up 12 seconds
zcbuscache reg.zbomc.com/zcbus_server:v2.0.1 "/bin/bash -c ${ZCBU…" zcbuscache 1 second ago Up Less than a second 0.0.0.0:6600-6602->6600-6602/tcp, :::6600-6602->6600-6602/tcp
zcbusdb reg.zbomc.com/zcbus_mysql:v2.0.1 "docker-entrypoint.s…" zcbusdb About a minute ago Up 57 seconds 3306/tcp, 33060/tcp
zcbusjob reg.zbomc.com/zcbus_job:v2.0.1 "sh /run.sh" zcbusjob 1 second ago Up Less than a second 7080/tcp
zcbusnet reg.zbomc.com/zcbus_server:v2.0.1 "/bin/bash -c ${ZCBU…" zcbusnet About a minute ago Up 1 second 0.0.0.0:33060->33060/tcp, :::33060->33060/tcp
zcbusredis reg.zbomc.com/zcbus_redis:v2.0.1 "docker-entrypoint.s…" zcbusredis 1 second ago Up Less than a second 6379/tcp
zcbusrestapi reg.zbomc.com/zcbus_restapi:v2.0.1 "sh /run.sh" zcbusrestapi 1 second ago Up Less than a second 7080/tcp
zcbusvue reg.zbomc.com/zcbus_vue:v2.0.1 "/docker-entrypoint.…" zcbusvue 1 second ago Up Less than a second 0.0.0.0:8890->80/tcp, :::8890->80/tcp
root 2767 1 0 10:47 pts/0 00:00:00 /data/docker02/bin/zcbus_docker -log_level 2
root 2792 1 0 10:47 pts/0 00:00:00 /data/docker02/bin/zcbus_docker -manager -log_level 2
root 3056 1 0 10:47 pts/0 00:00:00 /data/docker02/bin/zcbus_docker -listener -log_level 2
[OK] ZCBUS installation completed
[INFO] Install mode: server
[INFO] Data directory: /data/docker02
[INFO] Manager console: http://192.168.2.201:8890
[INFO] Default account: admin (change the default password after first login)
[INFO] Installation log: /tmp/zcbus-install-20260813-104513-27796.log4.2 页面验证默认容器添加激活,且生效

文档更新时间: 2026-10-07 22:03 作者:liyue