配置ZooKeeper集群11

Posted 蝌蚪的精神

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置ZooKeeper集群11相关的知识,希望对你有一定的参考价值。

配置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集群11的主要内容,如果未能解决你的问题,请参考以下文章

烂泥:ActiveMQ的集群安装与配置

ActiveMQ 高可用集群安装配置(ZooKeeper + LevelDB)

错误集之Zookeeper集群搭建Mode: standalone

ZooKeeper 集群的安装配置---Dubbo 注册中心

zooKeeper集群搭建

部署 Zookeeper 高可用集群