8.Humpback部署
Posted ff111
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了8.Humpback部署相关的知识,希望对你有一定的参考价值。
准备
准备三台安装过Docker服务器
192.168.215.81 192.168.215.82 192.168.215.83
三台设备均安装JDK
https://www.cnblogs.com/ff111/p/11868976.html
部署过程参考
https://humpback.github.io/humpback/#/zh-cn/run-humpback-components
1.Zookeeper 集群部署
三台同时操作如下
cd /opt
mkdir app #创建一个app目录
cd /opt/app #跳转到app目录
wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz #从网络获得zookeeper 也可以通过网址离线下载http://mirror.bit.edu.cn/apache/zookeeper/
tar -xzvf zookeeper-3.4.14.tar.gz #解压
mv zookeeper-3.4.14 zookeeper #移动解压目录
cd zookeeper
修改配置文件
cp conf/zoo_sample.cfg conf/zoo.cfg
vi conf/zoo.cfg
修改如下
# The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/opt/app/zookeeper/zkdata dataLogDir=/opt/app/zookeeper/logs # the port at which the clients will connect clientPort=2181 # the maximum number of client connections. # increase this if you need to handle more clients #maxClientCnxns=60 # # Be sure to read the maintenance section of the # administrator guide before turning on autopurge. # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1 server.1=192.168.215.81:2888:3888 server.2=192.168.215.82:2888:3888 server.3=192.168.215.83:2888:3888
创建数据目录
mkdir -p /opt/app/zookeeper/zkdata
mkdir -p /opt/app/zookeeper/logs
以上安装流程三台服务器都照执行,接下来开始创建 zookeeper 集群并启动。
建立 Zookeeper 节点标识文件 myid
192.168.215.81
echo "1" > /opt/app/zookeeper/zkdata/myid
192.168.215.81
echo "1" > /opt/app/zookeeper/zkdata/myid
192.168.215.82
echo "2" > /opt/app/zookeeper/zkdata/myid
192.168.215.83
echo "3" > /opt/app/zookeeper/zkdata/myid
分别启动zookeeper
192.168.215.81
192.168.215.82
192.168.215.83
/opt/app/zookeeper/bin/zkServer.sh start
检查状态
/opt/app/zookeeper/bin/zkServer.sh status
2.部署私有仓库
以上是关于8.Humpback部署的主要内容,如果未能解决你的问题,请参考以下文章