ZCBUS集群部署架构图
1 环境准备
主机 | 配置说明 |
---|---|
物理配置 | cpu 4核以上,内存4GB以上,磁盘100GB以上 |
操作系统 | LINUX(centos7) |
网络 | 数据交换服务器,需要和需要共享数据的数据库、大数据平台之间,网络设备畅通。如果存在网络不畅通情况下,必须通过前置机畅通,通过前置机跳转实现数据交换服务。 |
2 环境检查
2.1 防火墙服务检查
检查防火墙是否启动:
systemctl status firewalld.service
停止防火墙服务:
systemctl stop firewalld.service
禁用防火墙开机启动服务:
systemctl disable firewalld.service
- 注意:主机名检查,三个主机名不允许一样,否则安装时会提示以下报错中断安装。
3 软件下载解压
- 集群软件下载
http://zbomc.com:8888/ZCBUS/2.0/zcbus.grid.docker.v2.0.1.x86_64.tar.gz - 单机版下载
http://zbomc.com:8888/ZCBUS/2.0/zcbus.simple_server.docker.v2.0.1.x86_64.tar.gz - 说明:单机版本下载后,解压的simple_server目录移动到grid目录soft下既可以开启ZCBUS集群安装之旅
3.1 配置文件说明:
- grid/conf/ssh.conf
- 配置多个节点之间SSH互信
- grid/conf/grid.ini
- 配置ZCBUS集群部署关系
- grid/conf/zcbus.properties
- 配置节点对应数据库,kafka等配置信息
- grid/conf/ssh.conf
4 修改集群配置文件
4.1 主机信息配置文件
注:安装集群的用户需要ROOT权限
[root@node1 grid]# cat conf/ssh.conf
#ssh_trust
[host1]
name=zcbus01
host=192.168.2.45
port=22
user=zcbus1
password=buszc1qaz@WSX
[host2]
name=zcbus02
host=192.168.2.215
port=22
user=zcbus1
password=buszc1qaz@WSX
[host3]
name=zcbus03
host=192.168.2.155
port=22
user=zcbus1
password=buszc1qaz@WSX
4.2 kafka集群信息配置文件
[root@node1 grid]# cat conf/grid.ini
####################################################################
## 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. ##
## ##
####################################################################
#-------------------------------------------------------------------------------
# for install zcbus dirpath
#-------------------------------------------------------------------------------
## 设置zcbus软件安装目录
zcbus_data_path=/home/data/zc01
#-------------------------------------------------------------------------------
# for install zcbus's dockers dirpath
#-------------------------------------------------------------------------------
## 如服务器未安装docker,软件将安装docker并设置docker安装路径
zcbus_docker_path=/home/data/dk
#-------------------------------------------------------------------------------
# for install kafka basic info
#-------------------------------------------------------------------------------
## 设置KAFKA/ZOOKEEPER端口,一般默认即可
#kafka_cluster
kafka_ports="12181 12888 13888 19092"
## kafka副本数
FACTOR_NUM=2
## kafka内存,单位:G
KAFKA_MEM=1
ZC_ZK_MEM=1
ZOOK_PORT_1=`echo "${kafka_ports}"|awk '{print $1}'`
ZOOK_PORT_2=`echo "${kafka_ports}"|awk '{print $2}'`
ZOOK_PORT_3=`echo "${kafka_ports}"|awk '{print $3}'`
KAFKA_PORT=`echo "${kafka_ports}"|awk '{print $4}'`
#KAFKA_DIR="${zcbus_data_path}/kafka/data/kafka-logs"
#ZOOK_DIR="${zcbus_data_path}/kafka/data/zookeeper"
#-------------------------------------------------------------------------------
# for install zk user
#-------------------------------------------------------------------------------
zkgroup=zkgroup
zkuser=zkuser
zkpwd=zkpwd
#-------------------------------------------------------------------------------
# for install kfk user
#-------------------------------------------------------------------------------
kfkgroup=kfkgroup
kfkuser=kfkuser
kfkpwd=kfkpwd
#-------------------------------------------------------------------------------
# for install kafka node
#-------------------------------------------------------------------------------
## 指定在主机上安装kafka和zookeeper,一般默认即可
ZCBUS_KAFKA=host1,host2,host3
#-------------------------------------------------------------------------------
# for install zcbus node
#-------------------------------------------------------------------------------
## 指定在主机上安装zcbus软件,一般默认即可
ZCBUS_NODES=host1,host2,host3
#-------------------------------------------------------------------------------
# for zcbus mysql master db host
#-------------------------------------------------------------------------------
ZCBUS_MASTER_DB=host1
#-------------------------------------------------------------------------------
# for zcbus mysql slave db host
#-------------------------------------------------------------------------------
ZCBUS_SLAVE_DB=host2
#-------------------------------------------------------------------------------
# for zcbus master node info
#-------------------------------------------------------------------------------
ZCBUS_MASTER_NODE=host1
#-------------------------------------------------------------------------------
# for zcbus kafka Authentication method,0 no Authentication,1 sasl
#-------------------------------------------------------------------------------
ZCBUS_SASL=0
#-------------------------------------------------------------------------------
# for zcbus soft and cache minimum limit 500GB
#-------------------------------------------------------------------------------
zcbus_data_limit=50G
#-------------------------------------------------------------------------------
# for zcbus docker images minimum limit 10GB
#-------------------------------------------------------------------------------
zcbus_docker_limit=10G
#-------------------------------------------------------------------------------
# for ZCBUS use memory min limit set, Suggest setting the minimum value 4GB
#-------------------------------------------------------------------------------
zcbus_memory_limit=0G
4.3 zcbus节点配置文件
[root@node1 grid]# cat conf/zcbus.properties
####################################################################
## 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. ##
## ##
####################################################################
#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ZCBUS INSTALL home ,for storage docker's cache and images
#-------------------------------------------------------------------------------
## 默认即可
ZC_DATA_HOME=/home/data/zc01
#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ZCBUS'S docker basic home ,for storage docker's cache and images
#-------------------------------------------------------------------------------
## 默认即可
ZC_DOCKER_HOME=/home/data/dk
#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify docker's username
#-------------------------------------------------------------------------------
## 添加默认用户zcbus,一般默认即可
ZC_DOCKER_USER=zcbus
#-------------------------------------------------------------------------------
# Specify a location to install ZCBUS'S TYPE ,Only support cloud_client
#-------------------------------------------------------------------------------
## 指定软件安装类型,一般默认为server即可
ZC_TYPE=server
#-------------------------------------------------------------------------------
# Specify a docker's listener port
#-------------------------------------------------------------------------------
## 默认即可
ZC_DOCKER_SERVER_PORT=8899
#-------------------------------------------------------------------------------
# Zcbus client remote location API service URL connection service
#-------------------------------------------------------------------------------
## 默认即可
ZC_CUSTOMER_URL=http://v2.zbomc.com
#-------------------------------------------------------------------------------
# Remote receiving zcbus data stream port service
#-------------------------------------------------------------------------------
## 设置KAFKA连接信息,IP为KAFKA实际安装地址,可参考ssh.conf配置文件,端口为默认19092
ZC_CACHE_SERVER=192.168.2.195:19092,192.168.2.202:19092,192.168.2.214:19092
#-------------------------------------------------------------------------------
# Remote receiving zcbus data resource port service
#-------------------------------------------------------------------------------
## 设置zcbus连接数据库信息,一般默认即可
ZC_NET_DB_SERVER_DBNAME=zcbus
ZC_NET_DB_SERVER_HOST=zcbusnet
ZC_NET_DB_SERVER_PORT=33060
ZC_NET_DB_SERVER_USER=QFlYT0k6
ZC_NET_DB_SERVER_PWD=e0twWGp8aVtWfGB8dn9YdTo
ZC_NET_DB_SERVER_ID=2
ZC_INSTALL_MODE=1
#-------------------------------------------------------------------------------
# Remote receiving zcbus data resource port service,include master and slave's ip
#-------------------------------------------------------------------------------
## 默认即可
ZC_DB_IPPORT=zcbusnet:33060
#-------------------------------------------------------------------------------
# Remote zcbus'services nodes ip
#-------------------------------------------------------------------------------
## 集群IP列表
ZC_NODE_IPS=192.168.2.195,192.168.2.202,192.168.2.214
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Remote install zcbus type integrate/external
#-------------------------------------------------------------------------------
## 设置zcbus软件安装模式,默认为integrate模式,使用external模式需要配合ZC_SERV_LOCALTION参数使用
ZC_METHOD=integrate
#-------------------------------------------------------------------------------
# Remote install zcbus include database docker
# 0 is equal ZC_METHOD's integrate mode,all server include docker,and other is external mode
# 1 is include zcbusvue/zcbusrestapi
# 2 is include zcbusvue/zcbusrestapi,zcbusdb
# 3 is include zcbusvue/zcbusrestapi,zcbuskafka/zcbuszookeeper
#-------------------------------------------------------------------------------
## 设置软件安装哪些组件,需要配合ZC_METHOD参数使用,默认为0
ZC_SERV_LOCALTION=0
#-------------------------------------------------------------------------------
# Parameter set to zcbus_cache/kafka_cache
# zcbus_cache is zcbus's mq for zcbus single mode
# kafka_cache is kafka or zcbus cluster mode
#-------------------------------------------------------------------------------
## 设置数据缓存方式,默认为kafka_cache
ZC_CACHE_TYPE=kafka_cache
#-------------------------------------------------------------------------------
# Parameter set to 1, Kafka uses Sasl authentication, set to 0, no authentication method
#-------------------------------------------------------------------------------
## KAFKA是否采用sasl谁方式,0无需认证,1采用sasl认证
ZC_CACHE_SASL=0
#-------------------------------------------------------------------------------
# if add zcbus's default container :1 is add container,0 is not add container
#-------------------------------------------------------------------------------
## 是否添加默认容器zcbus,1为添加容器,0不添加默认容器
ZC_IF_ADD_DEFAULT_ZCBUS=1
#------------------------------------------------------------------------------
#- for check data file limit
#------------------------------------------------------------------------------
ZC_DATA_DIR_LIMIT=10G
#------------------------------------------------------------------------------
#- for check docker limit
#------------------------------------------------------------------------------
ZC_DOCKER_DIR_LIMIT=5G
#-------------------------------------------------------------------------------
# for ZCBUS use memory min limit set, Suggest setting the minimum value 4GB
#-------------------------------------------------------------------------------
ZC_MEMORY_LIMIT=0G
4.4 hosts文件配置
[root@zcbus01 grid]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.2.45 zcbus01
192.168.2.215 zcbus02
192.168.2.155 zcbus03
5 安装部署
- ./zcsrv.sh install
看到如下信息时,表示软件集群安装成功
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.37.5
Master_User: zcbus_ref
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: my-bin.000003
Read_Master_Log_Pos: 82361303
Relay_Log_File: 764e76d60f1c-relay-bin.000002
Relay_Log_Pos: 1205
Relay_Master_Log_File: my-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 82361303
Relay_Log_Space: 1419
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 2
Master_UUID: 2a58952c-e4e8-11ee-9e0f-0242ac120003
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 2a58952c-e4e8-11ee-9e0f-0242ac120003:839-840
Executed_Gtid_Set: 2a58952c-e4e8-11ee-9e0f-0242ac120003:839-840,
c73b5fd7-e4e8-11ee-a2e8-0242ac120003:1-1657
Auto_Position: 0
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
execute sucessfull...
Note: ready for slave host2:192.168.37.6 create replication user ...
Note: ready send file /tmp/zcbus/create_rs_user.sh
Note: Copying /tmp/zcbus/create_rs_user.sh to root:192.168.37.6:/tmp/zcbus/
➜ Copy /tmp/zcbus/create_rs_user.sh to root:192.168.37.6:/tmp/zcbus/ ok ...
Note: Ready Master info
mysql: [Warning] Using a password on the command line interface can be insecure.
Note: ready for master change log info for replication ...
Note: ready send file /tmp/zcbus/sync_to_master_data.sh
Note: Copying /tmp/zcbus/sync_to_master_data.sh to root:192.168.37.5:/tmp/zcbus/
➜ Copy /tmp/zcbus/sync_to_master_data.sh to root:192.168.37.5:/tmp/zcbus/ ok ...
Note: ready send file ./scripts/sync_master.sh
Note: Copying ./scripts/sync_master.sh to root:192.168.37.5:/tmp/zcbus/
➜ Copy ./scripts/sync_master.sh to root:192.168.37.5:/tmp/zcbus/ ok ...
Note: Ready master for 192.168.37.5
===> Get Master logs ...
mysql: [Warning] Using a password on the command line interface can be insecure.
execute sucessfull...
file my-bin.000005 . position 82346888 ...
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
sleep(3)
0
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.37.6
Master_User: zcbus_ref
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: my-bin.000005
Read_Master_Log_Pos: 82346888
Relay_Log_File: c43f90e47742-relay-bin.000002
Relay_Log_Pos: 317
Relay_Master_Log_File: my-bin.000005
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 82346888
Relay_Log_Space: 531
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 10
Master_UUID: c73b5fd7-e4e8-11ee-a2e8-0242ac120003
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set: 2a58952c-e4e8-11ee-9e0f-0242ac120003:1-840
Auto_Position: 0
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
execute sucessfull...
Note: ready for slave host2:192.168.37.6
[Step 24]: clear node's soft cache for ...
Note: 192.168.2.45
ssh 192.168.2.45 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no "rm -rf /data/zcbus/simple_server"
➜ Clear soft success !!!
Note: 192.168.2.215
ssh 192.168.2.215 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no "rm -rf /data/zcbus/simple_server"
➜ Clear soft success !!!
Note: 192.168.2.155
ssh 192.168.2.155 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no "rm -rf /data/zcbus/simple_server"
➜ Clear soft success !!!
6 集群运行状态检查
- 查看帮助信息
[root@gridtest1 grid]# ./zcsrv.sh -h
➜ Usage :
➜ ==================================================================
➜ >>> Version 2.0.1. copyright (C) 2021 Zcbus. inc. <<<
➜ ==================================================================
➜ : install # install grid for zcbus
➜ : uninstall # uninstall grid all info
➜ : switch view/run # switch master'slave database service
➜ : update beforevalue aftervalue # update docker-compose/zcbus.properties's username or password
➜ : add 192.168.0.101 # add zcbus node for 192.168.0.101
➜ : drop 192.168.0.101 # drop zcbus node for 192.168.0.101
➜ : check all/trust/zcbus/db/kafka/web # check zcbus's all info
➜ : oper stop/start/restart/ps # oper zcbus's container operation
➜ : zk/zookeeper/kafka stop/start/check # oper kafka's operation
➜ : test_conn # check zcbus's db nodes's status
- 集群状态检查
[root@gridtest1 grid]# ./zcsrv.sh check all
➜ *****************************************************************************
➜ ------------------------- check kafka/zookeeper -----------------------------
➜ *****************************************************************************
➜ check kafka broker for host1 : 192.168.37.5 server.properties
➜ Check kafka server:server.properties for 192.168.37.5 ok ...
➜ check kafka broker for host2 : 192.168.37.6 server.properties
➜ Check kafka server:server.properties for 192.168.37.6 ok ...
➜ check kafka broker for host3 : 192.168.37.7 server.properties
➜ Check kafka server:server.properties for 192.168.37.7 ok ...
➜ check zookeeper for host1 : 192.168.37.5
ZooKeeper JMX enabled by default
Using config: /data/zcbus/kafka/zk/bin/../conf/zoo.cfg
➜ Check zookeeper server for 192.168.37.5 ok ...
➜ check zookeeper for host2 : 192.168.37.6
ZooKeeper JMX enabled by default
Using config: /data/zcbus/kafka/zk/bin/../conf/zoo.cfg
➜ Check zookeeper server for 192.168.37.6 ok ...
➜ check zookeeper for host3 : 192.168.37.7
ZooKeeper JMX enabled by default
Using config: /data/zcbus/kafka/zk/bin/../conf/zoo.cfg
➜ Check zookeeper server for 192.168.37.7 ok ...
➜ *****************************************************************************
➜ ----------------------------- check zcbusdb ---------------------------------
➜ *****************************************************************************
➜ ===============check ip 192.168.37.5==================
Note: Ready db node 192.168.37.5
8c7087ea9634 reg.zbomc.com/zcbus_mysql:v2.0.1 "docker-entrypoint.s…" 11 minutes ago Up 11 minutes 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp zcbusdb
Note: Ready db node 192.168.37.5
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
mysqld is alive
➜ ===============check ip 192.168.37.6==================
Note: Ready db node 192.168.37.6
9ab782f20c07 reg.zbomc.com/zcbus_mysql:v2.0.1 "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp zcbusdb
Note: Ready db node 192.168.37.6
mysqld is alive
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
➜ *****************************************************************************
➜ ---------------------------------- check net -------------------------------
➜ *****************************************************************************
Note: Ready net node 192.168.37.5
44344dae4ab8 reg.zbomc.com/zcbus_net:v2.0.1 "sh /run.sh" 11 minutes ago Up 9 minutes 0.0.0.0:33060->33060/tcp, :::33060->33060/tcp zcbusnet
Note: Ready net node 192.168.37.6
c8a3deb8929a reg.zbomc.com/zcbus_net:v2.0.1 "sh /run.sh" 6 minutes ago Up 4 minutes 0.0.0.0:33060->33060/tcp, :::33060->33060/tcp zcbusnet
Note: Ready net node 192.168.37.7
d8f4ce39ea6c reg.zbomc.com/zcbus_net:v2.0.1 "sh /run.sh" 2 minutes ago Up About a minute 0.0.0.0:33060->33060/tcp, :::33060->33060/tcp zcbusnet
➜ *****************************************************************************
➜ ---------------------------------- check web -------------------------------
➜ *****************************************************************************
Note: Ready web node 192.168.37.5
03c4afb2ebfc reg.zbomc.com/zcbus_vue:v2.0.1 "/docker-entrypoint.…" 11 minutes ago Up 9 minutes 0.0.0.0:8890->80/tcp, :::8890->80/tcp zcbusvue
65550a2799dd reg.zbomc.com/zcbus_restapi:v2.0.1 "sh /run.sh" 11 minutes ago Up 9 minutes 7080/tcp zcbusrestapi
Note: Ready web node 192.168.37.6
7e953ffb0072 reg.zbomc.com/zcbus_vue:v2.0.1 "/docker-entrypoint.…" 6 minutes ago Up 4 minutes 0.0.0.0:8890->80/tcp, :::8890->80/tcp zcbusvue
0a921ed3d93b reg.zbomc.com/zcbus_restapi:v2.0.1 "sh /run.sh" 6 minutes ago Up 4 minutes 7080/tcp zcbusrestapi
Note: Ready web node 192.168.37.7
b6dacabf25f8 reg.zbomc.com/zcbus_vue:v2.0.1 "/docker-entrypoint.…" 2 minutes ago Up About a minute 0.0.0.0:8890->80/tcp, :::8890->80/tcp zcbusvue
74c176e4d08d reg.zbomc.com/zcbus_restapi:v2.0.1 "sh /run.sh" 2 minutes ago Up About a minute 7080/tcp zcbusrestapi
➜ *****************************************************************************
➜ ---------------------------- check work container --------------------------
➜ *****************************************************************************
Note: Ready work node 192.168.37.5
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3dd1ea92657f reg.zbomc.com/zcbus_server:v2.0.1 "/bin/bash -c ${ZCBU…" 9 minutes ago Up 9 minutes zcbus
Note: Ready work node 192.168.37.6
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Note: Ready work node 192.168.37.7
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- 数据库状态检查
[root@gridtest1 grid]# ./zcsrv.sh switch view
➜ ==================================VIEW DB'S CONFIG===========================================
➜
➜ Will swith 192.168.37.5 ===>> 192.168.37.6
➜
➜ ===================> master host info 192.168.37.5...
➜
mysql: [Warning] Using a password on the command line interface can be insecure.
*************************** 1. row ***************************
process: 36
➜ -----------> master 192.168.37.5 info:
mysql: [Warning] Using a password on the command line interface can be insecure.
Read_Master_Log_Pos: 82346888
Relay_Log_Pos: 317
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Last_Error:
Exec_Master_Log_Pos: 82346888
Relay_Log_Space: 531
SQL_Delay: 0
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
➜
➜ ===================> slave host info 192.168.37.6...
➜
mysql: [Warning] Using a password on the command line interface can be insecure.
*************************** 1. row ***************************
process: 0
➜ ----------> slave 192.168.37.6 info:
mysql: [Warning] Using a password on the command line interface can be insecure.
Read_Master_Log_Pos: 82372594
Relay_Log_Pos: 12496
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Last_Error:
Exec_Master_Log_Pos: 82372594
Relay_Log_Space: 12710
SQL_Delay: 0
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
➜
➜ 192.168.37.5's zcbus db 192.168.37.5 /data/zcbus/zcbus/yaml/docker-compose.yml
ZCBUS_REMOTEIP: 192.168.37.5:3306
➜ 192.168.37.6's zcbus db 192.168.37.5 /data/zcbus/zcbus/yaml/docker-compose.yml
ZCBUS_REMOTEIP: 192.168.37.5:3306
➜ 192.168.37.7's zcbus db 192.168.37.5 /data/zcbus/zcbus/yaml/docker-compose.yml
ZCBUS_REMOTEIP: 192.168.37.5:3306
➜ =====================================================================================================
7 软件登陆
安装完成之后,可以访问任何一个节点,都可以完成页面登陆
192.168.37.7==➜ =============================================================
192.168.37.7==➜ Manager console Website Address: http://host_ip:8890
192.168.37.7==➜ Default login account : admin
192.168.37.7==➜ Default login password: 123456
192.168.37.7==➜
文档更新时间: 2024-11-18 21:13 作者:操李红