安装配置 zookeeper


安装 zookeeper 需要 jdk1.8 环境

环境:centos

进入官网下载 zookeeper Apache ZooKeeper


将 tar 文件解压

cd opt/
tar -zxf apache-zookeeper-3.7.0-bin.tar.gz
cd apache-zookeeper-3.7.0-bin

创建配置文件

mkdir data
$ vi conf/zoo.cfg

tickTime = 2000
dataDir = /path/to/zookeeper/data
clientPort = 2181
initLimit = 5
syncLimit = 2

启动/停止 zookeeper

bin/zkServer.sh start
bin/zkServer.sh stop

启动 cli

bin/zkCli.sh

如图表示启动成功