下载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能看到帮助信息就是成功了
基础操作
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/140836.html