码迷,mamicode.com
首页 > 其他好文 > 详细

配置ZooKeeper集群

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

标签:snapshot   keep   文件   where   cto   cli   zoo.cfg   zookeeper   end   

配置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集群

标签:snapshot   keep   文件   where   cto   cli   zoo.cfg   zookeeper   end   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!