一、环境要求
系统运行环境,最低配置要求建议:
环境 | 要求 |
---|---|
主机 | CPU 4核、16GB内存、存储不少于500GB |
操作系统 | Centos 7 以上 |
磁盘空间 | 缓存目录建议同步数据库大小的 70% 以上 |
防火墙 | 关闭 |
seLinux | 关闭 |
软件下载地址
zcbus安装包下载:http://101.201.81.45:8888/ZCBUS/2.0/zcbus.simple_external.docker.v2.0.1.tar.gz
MySQL与kafka 安装部署
MYSQL/KAFKA外挂模式说明
安装过程中,选择external(外部安装模式)时,程序在安装过程中只会安装zcbus,acbusrestapi,zcbusvue三个容器,mysql+kafka可选用容器外部的程序,满足用户需求。
安装条件:mysql大版本5.7,kafka链接无认证方式
zcbus程序安装
解压
- tar zxvf zcbus.simple_external.docker.v2.0.1.tar.gz
修改配置文件
[root@lyzcbus simple_server]# vi common/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. ##
## ##
####################################################################
#-------------------------------------------------------------------------------
# Zcbus client remote location API service URL connection service
#-------------------------------------------------------------------------------
ZC_CUSTOMER_URL=http://v2.zbomc.com
#-------------------------------------------------------------------------------
# Remote receiving zcbus data stream port service
#-------------------------------------------------------------------------------
ZC_CACHE_SERVER=zcbuskafka:9092 (根据实际情况修改kafka地址/端口)
#-------------------------------------------------------------------------------
# Remote receiving zcbus data resource port service
#-------------------------------------------------------------------------------
ZC_DB_SERVER=QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@zcbusdb:3306/zcbus
(根据实际情况修改MySQL连接地址,用户名密码需要用simple_server/soft/zcbus/bin/pwd_encode进行加密)
#-------------------------------------------------------------------------------
# Remote install zcbus type integrate/external
#-------------------------------------------------------------------------------
ZC_METHOD=integrate
安装软件
#使用zcmgr.sh安装软件(可使用zcmgr.sh --help查看帮助)
[root@lyzcbus simple_server]# ./zcmgr.sh install
[Step 1]: checking OS version/firewalld/seLinux and config ...
############################## check host ::: /etc/hosts #############################################
➜ check host ::: 0 ::: WARNING
(检查参数步骤,脚本自动运行无具体操作,以省略)
############################## CHECK RESULT ##########################################################
➜ OK : 24 ERROR : 0 WARNING : 0(此处可查看软件需求的系统配置是否满足,无ERROR即可)
[INFO] whether to start install zcbus ... Please input 'y/Y' to continue/press Ctrl+C to exit :y(是否安装,输入Y)
[INFO] whether to install chinese[0]/english[1],defaut is 0:0(选择安装中英文版)
[INFO] whether to install integrate/external ,defaut is integrate:external(选择集成/外部安装模式)
####################install module####################
.......................................[ server ]
.......................................[ client ]
.......................................[ server_full ]
.......................................[ client_full ]
.......................................[ cloud_server ]
.......................................[ cloud_client ]
Please input Select Mode,default mode is [ server ]:server(选择软件安装类型,以cloud开头的为云端产品,此处可默认server)
[Step 2]: ready for data dir path ...
[INFO] Please input docker path /data/docker02:/docker(选择安装目录)
➜ Find path /docker
➜ Ready Path for /docker finished ...
[Step 3]: checking if docker is installed ...
➜ unzip soft/docker-19.03.15.tgz ...
docker/
docker/containerd-shim
docker/containerd
docker/runc
docker/ctr
docker/docker-init
docker/docker
docker/docker-proxy
docker/dockerd
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
Docker version 19.03.15, build 99e3ed8
############################## docker version: 19.03.15 ##############################################
[Step 4]: checking docker-compose is installed ...
Install docker-compose ...
docker-compose version 1.25.0-rc4, build 8f3c9c58
############################## docker-compose version: 1.25.0 ########################################
[Step 5]: checking mysql directory ...
############################## Create directory mysql /docker/zcbusdata .... #########################
✔ Mysql data directory /docker/zcbusdata/mysql/data create Successful!
[Step 6]: checking kafka directory ...
############################## Create directory kafka /docker/zcbusdata/kafka .... ###################
✔ Kafka data directory /docker/zcbusdata/zcbuskafka/logs create Successful!
[Step 7]: checking cache directory ...
############################## Create directory cache /docker/zcbusdata .... #########################
✔ Mysql data directory /docker/zcbusdata/cache create Successful!
[Step 8]: checking zookeeper directory ...
############################## Create directory kafka /docker/zcbusdata/kafka .... ###################
✔ Zookeeoer data directory /docker/zcbusdata/zcbuszookeeper/data create Successful!
[Step 9]: loading zcbus images ...
[INFO] Please input if load images y/n:y
(挂载镜像步骤,无具体操作,已省略)
[Step 10]: checking if ports is used ...
➜ Port 8890 is available!!
[Step 11]: ready basic soft for container ...
➜ Ready compare soft ...
➜ Read zcbusserver jdk sucessfull....
➜ Read zcbusserver jar sucessfull....
➜ Read zcbusserver bin sucessfull....
➜ Read zcbusserver lib sucessfull....
➜ /docker/module/lib to /docker/zcbusdata/zcbusserver/ is build sucessfull...
➜ /docker/module/bin to /docker/zcbusdata/zcbusserver/ is build sucessfull...
➜ /docker/module/jdk to /docker/zcbusdata/zcbusserver/ is build sucessfull...
➜ /docker/module/jar to /docker/zcbusdata/zcbusserver/ is build sucessfull...
[Step 12]: starting zcbus ...
Creating zcbusrestapi ... done
Creating zcbusvue ... done
====>>>ZCBUS [ Fri Oct 28 10:13:44 CST 2022 ]
Name Command State Ports
----------------------------------------------------------------------------
zcbusrestapi sh /run.sh Up 7080/tcp
zcbusvue /docker-entrypoint.sh /bin ... Up 0.0.0.0:8890->80/tcp
➜
➜ Manager console Website Address: http://ipaddress:8890
➜ Default login account : admin
➜ Default login password: 123456
➜
➜ =======================================
✔ ----Zcbus has been installed and started successfully.----
➜ Ready compare soft ...
➜ /docker/module/lib to /docker/zcbusdata/zcbus/ is build sucessfull...
➜ /docker/module/bin to /docker/zcbusdata/zcbus/ is build sucessfull...
➜ /docker/module/jdk to /docker/zcbusdata/zcbus/ is build sucessfull...
➜ /docker/module/jar to /docker/zcbusdata/zcbus/ is build sucessfull...
➜ type :zcbus
➜ ready customerurl /soft/simple_server/common/zcbus.properties ...
➜ get customerurl: http://v2.zbomc.com ...
➜ ready db_server /soft/simple_server/common/zcbus.properties ...
➜ get db_server: QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@zcbusdb:3306/zcbus ...
➜ ready kafka url /soft/simple_server/common/zcbus.properties CACHE_SERVER...
➜ get kafka_server: zcbuskafka:9092 ...
Check hostname [lyzcbus.test] ip is :[lyzcbus.test]
db_server : QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@zcbusdb:3306/zcbus
append Service sucessfull...
Flush data to /compose_location/docker-compose.yml
Creating zcbus ...
zcbusrestapi is up-to-date
Creating zcbus ... done
====>>>ZCBUS [ Fri Oct 28 10:13:58 CST 2022 ]
Name Command State Ports
----------------------------------------------------------------------------
zcbus /bin/bash -c ${ZCBUS_HOME} ... Up
zcbusrestapi sh /run.sh Up 7080/tcp
zcbusvue /docker-entrypoint.sh /bin ... Up 0.0.0.0:8890->80/tcp
登录WEB界面
登录地址
http://ipaddress:8890
初始用户名密码为:admin/123456
软件安装过程中,自动创建zcbus容器,至此安装步骤已完成,可开始使用zcbus数据交换服务。
添加新容器
1.程序包解压目录/simple_server下,执行:./zcmgr.sh add container_name
添加新容器:zcbus_01
[root@lyzcbus simple_server]# ./zcmgr.sh add zcbus_01
➜ Ready compare soft ...
➜ /docker/module/lib to /docker/zcbusdata/zcbus_01/ is build sucessfull...
➜ /docker/module/bin to /docker/zcbusdata/zcbus_01/ is build sucessfull...
➜ /docker/module/jdk to /docker/zcbusdata/zcbus_01/ is build sucessfull...
➜ /docker/module/jar to /docker/zcbusdata/zcbus_01/ is build sucessfull...
➜ type :zcbus
➜ ready customerurl /soft/simple_server/common/zcbus.properties ...
➜ get customerurl: http://v2.zbomc.com ...
➜ ready db_server /soft/simple_server/common/zcbus.properties ...
➜ get db_server: QFlYT0k6/C0tbQBtre2A6@192.168.71.138:3306/zcbus_1 ...
➜ ready kafka url /soft/simple_server/common/zcbus.properties CACHE_SERVER...
➜ get kafka_server: 192.168.71.138:9092 ...
➜ ready method url /soft/simple_server/common/zcbus.properties METHOD...
➜ get method: integrate ...
Check hostname [lyzcbus.test]'s ip is :[192.168.71.138]
db_server : QFlYT0k6/C0tbQBtre2A6@192.168.71.138:3306/zcbus_1
append Service sucessfull...
Flush data to /compose_location/docker-compose.yml
zcbusrestapi is up-to-date
Creating zcbus_01 ...
zcbus is up-to-date
Creating zcbus_01 ... done
====>>>ZCBUS [ Wed Nov 9 16:04:01 CST 2022 ]
Name Command State Ports
----------------------------------------------------------------------------
zcbus /bin/bash -c ${ZCBUS_HOME} ... Up
zcbus_01 /bin/bash -c ${ZCBUS_HOME} ... Up
zcbusrestapi sh /run.sh Up 7080/tcp
zcbusvue /docker-entrypoint.sh /bin ... Up 0.0.0.0:8890->80/tcp
2.进入软件WEB界面,添加容器
新添加容器zcbus_01显示正常后,可开始在zcbus_01中使用数据交换服务。
删除容器
1.程序包解压目录/simple_server下,执行:./zcmgr.sh drop container_name
删除容器:zcbus_01
[root@lyzcbus simple_server]# ./zcmgr.sh drop zcbus_01
[INFO] Please Make sure drop zcbus server [zcbus_01] [y,Y]/[n,N]:y
====>>>ZCBUS [ Wed Nov 9 16:06:08 CST 2022 ]
Stopping zcbus_01 ... done
====>>>ZCBUS [ Wed Nov 9 16:06:23 CST 2022 ]
Name Command State Ports
-------------------------------------------------------------------------------
zcbus /bin/bash -c ${ZCBUS_HOME} ... Up
zcbus_01 /bin/bash -c ${ZCBUS_HOME} ... Exit 137
zcbusrestapi sh /run.sh Up 7080/tcp
zcbusvue /docker-entrypoint.sh /bin ... Up 0.0.0.0:8890->80/tcp
====>>>ZCBUS [ Wed Nov 9 16:06:24 CST 2022 ]
Name Command State Ports
-------------------------------------------------------------------------------
zcbus /bin/bash -c ${ZCBUS_HOME} ... Up
zcbus_01 /bin/bash -c ${ZCBUS_HOME} ... Exit 137
zcbusrestapi sh /run.sh Up 7080/tcp
zcbusvue /docker-entrypoint.sh /bin ... Up 0.0.0.0:8890->80/tcp
Check hostname [lyzcbus.test]'s ip is :[192.168.71.138]
Flush data to /compose_location/docker-compose.yml
Delete zcbus zcbus_01 Sucessfull...
====>>>ZCBUS [ Wed Nov 9 16:06:29 CST 2022 ]
Name Command State Ports
----------------------------------------------------------------------------
zcbus /bin/bash -c ${ZCBUS_HOME} ... Up
zcbusrestapi sh /run.sh Up 7080/tcp
zcbusvue /docker-entrypoint.sh /bin ... Up 0.0.0.0:8890->80/tcp
2.进入软件WEB界面
- 删除容器
- 删除成功
文档更新时间: 2022-12-01 21:51 作者:阿力