您的位置:首页 > 编程语言 > Java开发

Zookeeper的安装和配置

2016-03-11 00:00 513 查看
摘要: 简单记录Zookeeper的安装和配置

一、Windows开发环境

Zookeeper的安装和配置:

1.登录Zookeeper的官网,下载Zookeeper的安装包(我使用的是3.4.8的稳定版本),然后直接解压即可

http://zookeeper.apache.org/

2.根据Zookeeper的文档进行Zookeeper的配置,创建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需要根据自己的情况配置
dataDir=D:\zookeeper\data

# 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

3.在CMD中启动Zookeeper服务

D:\zookeeper\bin\zkServer.cmd
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Zookeeper java