Windows 安装 ZooKeeper
下载zookeeper
https://zookeeper.apache.org/releases.html#download
https://www.apache.org/dyn/closer.lua/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz
下载完成后解压
配置
To start ZooKeeper you need a configuration file. Here is a sample, create it in conf/zoo.cfg:
tickTime=2000
dataDir=/var/lib/zookeeper
clientPort=2181
在windows下,可以参考zoo_sample.cfg
#the directory where the snapshot is stored.
#do not use /tmp for storage, /tmp here is just
#example sakes.
dataDir=/tmp/zookeeper
#the port at which the clients will connect
clientPort=2181
把zoo_sample.cfg 复制一份为zoo.cfg修改下dataDir
Server端直接运行
client直接运行
运行后输入help能看到帮助信息就是成功了