容器组件关系图
容器分类&关系前端业务zcbusvuezcbusrestapizcbusdbzcbus服务zcbuskafkazcbuszookeeper
组建介绍
后台任务 数据缓存区 前台任务操作数据库发布/订阅zcbus交换服务kafkazookeepernginxvuerestapiZCBUS平台mysql

1、安装环境要求

内容 要求
操作系统版本 Linux 7 以上
防火墙 关闭
seLinux 关闭
磁盘空间 缓存目录建议同步数据库大小的 70%

2、环境准备

主机配置

  • 正式安装前请配置主机/etc/hosts文件,填写主机IP及主机名,并查看hostname是否与/etc/hosts的主机名相同
    注:在修改主机时,不要使用如127.0.0.1或者localhost
[root@vm-307708 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
#::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.141.134.223 zcnode01

软件下载

# 下载容器安装包
x86版本:
http://zbomc.com:8888/ZCBUS/2.0/zcbus.simple_server.docker.v2.0.1.x86_64.zcbus.tar.gz
arm版本:
http://zbomc.com:8888/ZCBUS/2.0/zcbus.simple_server.docker.v2.0.1.aarch64.tar.gz
# 解压
x86版本:
tar -xzvf zcbus.simple_server.docker.v2.0.1.x86_64.tar.gz
arm版本:
tar -xzvf zcbus.simple_server.docker.v2.0.1.aarch64.tar.gz

3、安装

# 进入到软件解压目录(以实际解压路径为主,此处为演示路径)
cd /home/zcbus/data1/simple_server/
#使用zcmgr.sh安装软件(可使用zcmgr.sh --help查看帮助)
[root@m2db01 server_full]# ./zcmgr.sh install

[root@iZ2ze7y8byz5e2ki7gbcjpZ simple_server]# ./zcmgr.sh install 

[Step 1]: checking OS version/firewalld/seLinux  and config ...
############################## check host ::: /etc/hosts #############################################
➜ check host ::: 2 ::: OK
➜ #172.17.104.186       iZ2ze7y8byz5e2ki7gbcjpZ iZ2ze7y8byz5e2ki7gbcjpZ
172.17.104.186  iZ2ze7y8byz5e2ki7gbcjpZ iZ2ze7y8byz5e2ki7gbcjpZ
############################## check selinux ::: /etc/selinux/config #################################
➜ check selinux ::: disabled ::: OK
############################## check firewalld #######################################################
➜ check firewalld ::: not running ::: OK
############################## check sysctl ::: /etc/sysctl.conf #####################################
➜ kernel.shmall ::: 4294967296 (>=4294967296) ::: OK
➜ fs.aio-max-nr ::: 1048576 (>=1048576) ::: OK
➜ fs.file-max ::: 6815744 (>=6815744) ::: OK
➜ kernel.shmmax ::: 2070833152 (>=2070833152) ::: OK
➜ kernel.shmmni ::: 4096 (>=4096) ::: OK
➜ kernel.sem ::: 250 (>=250) 32000 (>=32000) 100 (>=100) 128 (>=128) ::: OK
➜ net.ipv4.ip_local_port_range ::: 1024 (>=1024) 65500 (>=65500) ::: OK
➜ net.core.rmem_default ::: 262144 (>=262144) ::: OK
➜ net.core.rmem_max ::: 4194304 (>=4194304) ::: OK
➜ net.core.wmem_default ::: 262144 (>=262144) ::: OK
➜ net.core.wmem_max ::: 1048576 (>=1048576) ::: OK
➜ kernel.threads-max ::: 999999 (>=999999) ::: OK
➜ kernel.pid_max ::: 999999 (>=999999) ::: OK
➜ vm.max_map_count ::: 1999999 (>=1999999) ::: OK
➜ net.ipv4.ip_forward ::: 1 (>=1) ::: OK
➜ fs.inotify.max_user_watches ::: 1048576 (>=1048576) ::: OK
➜ fs.inotify.max_user_instances ::: 1048576 (>=1048576) ::: OK
############################## check limits ::: /etc/security/limits.conf ############################
➜ soft-nofile ::: 1048500 (>=1048500) ::: OK
➜ hard-nofile ::: 1048500 (>=1048500) ::: OK
➜ soft-nproc ::: 65536 (>=65536) ::: OK
➜ hard-nproc ::: 65536 (>=65536) ::: OK
############################## CHECK RESULT ##########################################################
➜ OK : 24 ERROR : 0 WARNING : 0
[INFO] whether to start install zcbus ... Please input 'y/Y' to continue/press Ctrl+C to exit :y
[INFO] whether to install chinese[0]/english[1],defaut is 0:
[INFO] whether to install integrate/external ,defaut is integrate:
####################install module####################
.......................................[ server ]
.......................................[ client ]
.......................................[ server_full ]
.......................................[ client_full ]
.......................................[ cloud_server ]
.......................................[ cloud_client ]
Please input Select Mode,default mode is [ server ]:

[Step 2]: ready for data dir path ...
[INFO] Please input docker path /data/docker02:
➜ Load Path to /data/docker02 ...

[Step 3]: checking if docker is installed ...
############################## docker version: 20.10.10 ##############################################

[Step 4]: checking docker-compose is installed ...
############################## docker-compose version: 1.25.0 ########################################

[Step 5]: checking mysql directory ...
############################## Create directory mysql /data/docker02/zcbusdata .... ##################
✔ Mysql data directory  /data/docker02/zcbusdata/mysql/data create Successful! 

[Step 6]: checking kafka directory ...
############################## Create directory kafka /data/docker02/zcbusdata/kafka .... ############
✔ Kafka data directory /data/docker02/zcbusdata/zcbuskafka/logs create Successful! 

[Step 7]: checking cache directory ...
############################## Create directory cache /data/docker02/zcbusdata .... ##################
✔ Mysql data directory  /data/docker02/zcbusdata/cache create Successful! 

[Step 8]: checking zookeeper directory ...
############################## Create directory kafka /data/docker02/zcbusdata/kafka .... ############
✔ Zookeeoer data directory /data/docker02/zcbusdata/zcbuszookeeper/data create Successful! 
➜ Fail to find zcbus.tar.gz!!!
➜ 
➜ network zcbus is already exists ...
➜ type :server
➜ ready customerurl /data1/zcbus_docker/zcbusSoft/simple_server/common/zcbus.properties ...
➜ get customerurl: http://v2.zbomc.com ...
➜ ready db_server /data1/zcbus_docker/zcbusSoft/simple_server/common/zcbus.properties ...
➜ get db_server: QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@zcbusdb:3306/zcbus ...
➜ ready kafka url /data1/zcbus_docker/zcbusSoft/simple_server/common/zcbus.properties CACHE_SERVER...
➜ get kafka_server: zcbuskafka:9092 ...
Check hostname [iZ2ze7y8byz5e2ki7gbcjpZ]'s ip is :[172.17.104.186]
ready basic info ...
db_server : QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@zcbusdb:3306/zcbus
Finish init basic ...
➜ 
➜ 

[Step 9]: checking if ports is used ...
➜ Port  8890 is available!!

[Step 10]: ready basic soft for container ...
➜ Ready compare soft ...
➜ Read zcbusserver jdk sucessfull....
➜ Read zcbusserver jar sucessfull....
➜ Read zcbusserver bin sucessfull....
➜ Read zcbusserver lib sucessfull....
➜ /data/docker02/module/lib to /data/docker02/zcbusdata/zcbusserver/ is build sucessfull...
➜ /data/docker02/module/bin to /data/docker02/zcbusdata/zcbusserver/ is build sucessfull...
➜ /data/docker02/module/jdk to /data/docker02/zcbusdata/zcbusserver/ is build sucessfull...
➜ /data/docker02/module/jar to /data/docker02/zcbusdata/zcbusserver/ is build sucessfull...

[Step 11]: starting zcbus ...
Creating zcbusvue       ... done
Creating zcbusdb        ... done
Creating zcbuszookeeper ... done
Creating zcbusrestapi   ... done
Creating zcbuskafka     ... done

====>>>ZCBUS [ Sat Nov 5 07:50:08 CST 2022 ]
     Name                   Command               State                 Ports               
--------------------------------------------------------------------------------------------
zcbusdb          docker-entrypoint.sh /run.sh     Up      0.0.0.0:33060->3306/tcp, 33060/tcp
zcbuskafka       docker-entrypoint.sh             Up                                        
zcbusrestapi     sh /run.sh                       Up      7080/tcp                          
zcbusvue         /docker-entrypoint.sh /bin ...   Up      0.0.0.0:8890->80/tcp              
zcbuszookeeper   docker-entrypoint.sh             Up                                        
➜ 
➜ Manager console Website Address: http://172.17.104.186:8890
➜ Default login account : admin
➜ Default login password: 123456
➜ 
➜ =======================================
✔ ----Zcbus has been installed and started successfully.----
➜ Ready compare soft ...
➜ /data/docker02/module/lib to /data/docker02/zcbusdata/zcbus/ is build sucessfull...
➜ /data/docker02/module/bin to /data/docker02/zcbusdata/zcbus/ is build sucessfull...
➜ /data/docker02/module/jdk to /data/docker02/zcbusdata/zcbus/ is build sucessfull...
➜ /data/docker02/module/jar to /data/docker02/zcbusdata/zcbus/ is build sucessfull...
➜ type :zcbus
➜ ready customerurl /data1/zcbus_docker/zcbusSoft/simple_server/common/zcbus.properties ...
➜ get customerurl: http://v2.zbomc.com ...
➜ ready db_server /data1/zcbus_docker/zcbusSoft/simple_server/common/zcbus.properties ...
➜ get db_server: QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@zcbusdb:3306/zcbus ...
➜ ready kafka url /data1/zcbus_docker/zcbusSoft/simple_server/common/zcbus.properties CACHE_SERVER...
➜ get kafka_server: zcbuskafka:9092 ...
Check hostname [iZ2ze7y8byz5e2ki7gbcjpZ]'s ip is :[172.17.104.186]
db_server : QFlYT0k6/e0twWGp8aVtWfGB8dn9YdTo@zcbusdb:3306/zcbus
append Service sucessfull...
Flush data to /compose_location/docker-compose.yml
zcbuszookeeper is up-to-date
zcbusdb is up-to-date
zcbusvue is up-to-date
zcbusrestapi is up-to-date
zcbuskafka is up-to-date
Creating zcbus ... done

====>>>ZCBUS [ Sat Nov 5 07:50:16 CST 2022 ]
     Name                   Command               State                 Ports               
--------------------------------------------------------------------------------------------
zcbus            /bin/bash -c ${ZCBUS_HOME} ...   Up      0.0.0.0:9092->9092/tcp            
zcbusdb          docker-entrypoint.sh /run.sh     Up      0.0.0.0:33060->3306/tcp, 33060/tcp
zcbuskafka       docker-entrypoint.sh             Up                                        
zcbusrestapi     sh /run.sh                       Up      7080/tcp                          
zcbusvue         /docker-entrypoint.sh /bin ...   Up      0.0.0.0:8890->80/tcp              
zcbuszookeeper   docker-entrypoint.sh             Up  
# 看到如上几个容器信息,软件即为安装成功,访问WEB页面地址为:http://172.17.104.186:8890

4 、添加容器

WEB添加容器

容器检查

删除容器

WEB容器删除

  • 删除容器
文档更新时间: 2024-04-11 18:49   作者:阿力