windows环境下安装ZooKeeper

$.说明

ZooKeeper:

      ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。
      它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等。
      ZooKeeper的目标就是封装好复杂易出错的关键服务,将简单易用的接口和性能高效、功能稳定的系统提供给用户。
 
$针对像我一样的萌新对于linux使用不熟悉或者遗忘的人,可以暂时使用windows建立服务,并配置Dubbox进行分布式准备。
 
我这里包括以下所使用的版本为 3.4.13。
1.解压并放在一个非中文路劲,点击进入conf >> zoo_sample.cfg文件 复制一份取名为  "zoo.cfg"
 2.在其中的文件中加入如下:
双注释中加入你的zookeeper的解压所存放的路径 并在其后添加一个     \data。
 
 1 # The number of milliseconds of each tick
 2 tickTime=2000
 3 # The number of ticks that the initial 
 4 # synchronization phase can take
 5 initLimit=10
 6 # The number of ticks that can pass between 
 7 # sending a request and getting an acknowledgement
 8 syncLimit=5
 9 # the directory where the snapshot is stored.
10 # do not use /tmp for storage, /tmp here is just 
11 # example sakes.
12 
13 
14            //--------------------------------------------
15 
16 dataDir=D:\VM-SSM\zookeeper-3.4.13\data
17 
18            //--------------------------------------------
19 
20 
21 # the port at which the clients will connect
22 clientPort=2181
23 # the maximum number of client connections.
24 # increase this if you need to handle more clients
25 #maxClientCnxns=60
26 #
27 # Be sure to read the maintenance section of the 
28 # administrator guide before turning on autopurge.
29 #
30 # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
31 #
32 # The number of snapshots to retain in dataDir
33 #autopurge.snapRetainCount=3
34 # Purge task interval in hours
35 # Set to "0" to disable auto purge feature
36 #autopurge.purgeInterval=1
37 
38     

3.通过cmd命令运行 bin >> zkServer.cmd 

4.找到你zkServer.cmd并回车运行 例如我的路径是:D:\VM-SSM\zookeeper-3.4.13\bin

 

5.当出现如下显示说明服务启动 和启动成功

 $关于ZooKeeper

对于zookeeper具体特点和具体功能代详细说明。

以上为zookeeper的windows安装。

对于linux安装可以使用winscp,CRT 等软件传入或者解压并用命令安装启动服务。

原文地址:https://www.cnblogs.com/CllOVER/p/10310816.html