• zookeeper下载地址:http://zookeeper.apache.org/releases.html#download   本次使用的是3.4.9版本
  • 前提:请安装JDK
  • 安装:
  1. 创建安装目录,将下载的zookeeper-3.4.9.tar.gz压缩包解压
  2. windows启动脚本在bin目录下zkServer.cmd
  3. 启动之前,修改配置文件;Zookeeper 的配置文件在 conf 目录下,这个目录下有 zoo_sample.cfg 和 log4j.properties,需要将 zoo_sample.cfg 改名为 zoo.cfg,因为 Zookeeper 在启动时会找这个文件作为默认配置文件;配置文件项如下:  
# 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=D:/work/emm_windows/zookeeper-3.4.9/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

    各项含义:

tickTime:这个时间是作为 Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个 tickTime 时间就会发送一个心跳。
initLimit:这个配置项是用来配置 Zookeeper 接受客户端(这里所说的客户端不是用户连接 Zookeeper 服务器的客户端,而是 Zookeeper 服务器集群中连接到 Leader 的 Follower 服务器)初始化连接时最长能忍受多少个心跳时间间隔数。当已经超过 10 个心跳的时间(也就是 tickTime)长度后 Zookeeper 服务器还没有收到客户端的返回信息,那么表明这个客户端连接失败。总的时间长度就是 5*2000=10 秒
syncLimit:这个配置项标识 Leader 与 Follower 之间发送消息,请求和应答时间长度,最长不能超过多少个 tickTime 的时间长度,总的时间长度就是 2*2000=4 秒
dataDir:顾名思义就是 Zookeeper 保存数据的目录,默认情况下,Zookeeper 将写数据的日志文件也保存在这个目录里。
clientPort:这个端口就是客户端连接 Zookeeper 服务器的端口,Zookeeper 会监听这个端口,接受客户端的访问请求。

  4.配置完成后,双机bin目录下的zkServer.cmd启动

5.检查服务是否启动,可以通过 netstat – ano 命令查看是否有你配置的 clientPort 端口号在监听服务

windows安装zookeeper-单机模式的更多相关文章

  1. zookeeper单机模式安装

    zookeeper单机模式安装 更多文章:http://blogxinxiucan.sh1.newtouch.com/2017/07/26/zookeeper单机模式安装/ 下载zookeeper u ...

  2. window安装配置 zookeeper 单机模式

    1.zookeeper简单介绍 zookeeper是一个分布式的,开放源码的分布式应用程序协调服务,我所了解到的主要的使用场景有两个 (1).微服务注册中心(Dubbo较常用Zookeeper做注册中 ...

  3. Dubbo(三) 安装Zookeeper 单机-集群

    一.下载zookeeper zookeeper下载地址:https://www.apache.org/dyn/closer.cgi/zookeeper/点击下载 二.启动配置 选择合适版本下载后解压到 ...

  4. Windows安装zookeeper 单机版

    首先需要安装JdK,从Oracle的Java网站下载,安装很简单,就不再详述. 1.下载zookeeper, https://mirrors.tuna.tsinghua.edu.cn/apache/z ...

  5. zookeeper(二):linux centos下安装zookeeper(单机和集群)

    下载 http://zookeeper.apache.org/releases.html 解压 tar –zxvf zookeeper-3.4.6.tar.gz 解压文件到"/usr/loc ...

  6. Centos7安装Nacos单机模式以及集群模式(包含nignx安装以及实现集群)的相关配置

    Nacos 致力于帮助您发现.配置和管理微服务.Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现.服务配置.服务元数据及流量管理. Nacos支持三种部署模式 单机模式 - 用于测试 ...

  7. 简单读!zookeeper单机模式的启动逻辑

    zk用处如此之多,以至于每个地方都要你理解zk原理! 请按如下操作姿势打开: 1. 打开zk的git仓库地址:https://github.com/apache/zookeeper , 确认过眼神,它 ...

  8. 20190311 Windows安装ZooKeeper

    1. 说明 记录过程中踩过的坑 1.1. 环境 本机环境:Win10 ZooKeeper版本:3.4.6 2. 安装 2.1. 下载 官网下载网址 2.2. 修改配置文件 复制conf目录下的zoo_ ...

  9. windows 安装zookeeper

    1 .下载 java sdk 和zookeeper  安装包 因为zookeeper是依赖java sdk,运行zookeeper先要,安装javaSDK . 2.安装zookeeper,zookee ...

  10. RedHat6.5安装zookeeper单机

    版本号: Redhat6.5  zookeeper-3.4.6  JDK1.8 zookeeper下载 官网下载地址:https://mirrors.tuna.tsinghua.edu.cn/apac ...

随机推荐

  1. Java程序设计之打印100~999的水仙花数

    package printDaffodilNumber; /* * 题目:打印出所有的"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该数本身 ...

  2. Everything(文件搜索神器)

    前言 Everything官网: http://www.voidtools.com/ 软件版本: V1.3.4.686 (x64) 操作系统: windows 7/10 搜索FTP(内网)资源 比如内 ...

  3. LAMP和LNMP

    编译安装和yum安装 centos 7 可以使用10年 ubuntu可以使用5年 VirtualBox也是一个虚拟机 下载centos 安装centos exit   退出登陆 ping www.ba ...

  4. 原: 安装VMtools过程流水帐

    以下基于 vm12.0.0 1. 一定要打开虚拟机的 cd设置 2. 然后 cd   '/medal/VMware tools '   (注意一定要加 '', 因为VMware tools 有空格) ...

  5. 转: CentOS 安装 SVN1.8 客户端

     from: http://blog.csdn.net/clementad/article/details/46898091 CentOS 安装SVN客户端 标签: subversionrpmcent ...

  6. Oracle 表和表数据恢复

    1. 表恢复 对误删的表,只要没有使用 purge 永久删除选项,那么基本上是能从 flashback table 区恢复回来的. 数据表和其中的数据都是可以恢复回来的,记得 flashback ta ...

  7. Doc

    一:window: 属性(值或者子对象):opener:打开当前窗口的源窗口,如果当前窗口是首次启动浏览器打开的,则opener是null,可以利用这个属性来关闭源窗口. 方法(函数):事件(事先设置 ...

  8. [翻译]ES 提案: global

    Jordan Harband 的 ECMAScript 提案“global”现在处于第三阶段.该提案提供了一种新的用于访问全局对象的标准方式. 全局对象的引用 下面是常用的几种引用全局对象的方式: 全 ...

  9. freemarker种种

    #include要使用绝对路径的话,在路径最前面加个"/"就行--<#include "/includes/v2/headerMacro.ftl"> ...

  10. 如何在网页标题栏加入logo图标?

    标题栏: <link rel="icon" href="ico地址" type="image/x-icon">收藏夹:<l ...