首页 > 其他 > 详细

配置ZooKeeper集群

时间:2017-01-08 22:52:01      阅读:261      评论:0      收藏:0      [点我收藏+]

配置ZooKeeper集群(Windows环境下) 
1、解压三个zookeeper目录 
D:\zookeeper\zookeeper-1 
D:\zookeeper\zookeeper-2 
D:\zookeeper\zookeeper-3 

2、在这3个目录下面建立data和log目录,并在data目录下面新建myid文件 
myid的文件内容分别为:1、2、3 

3、在conf目录下面复制zoo_sample.cfg文件为zoo.cfg文件 

4、修改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. 
dataDir=D:\\zookeeper\\zookeeper-1\\data 
# the directory where the log 
dataLogDir=D:\\zookeeper\\zookeeper-1\\log 
# the port at which the clients will connect 
clientPort=2181 
#Clusters 
server.1=10.10.15.48:2888:3888 
server.2=10.10.15.48:2889:3889 
server.3=10.10.15.48:2890:3890 

配置ZooKeeper集群

原文:http://www.cnblogs.com/kedoudejingshen/p/6262940.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!