windows安装zookeeper-单机模式

author author     2022-08-09     530

关键词:

  • 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注册中心的安装和启动

http://blog.csdn.net/aqsunkai/article/details/51683632zookeeper的安装支持单机模式和集群模式下载地址:http://www.apache.org/dyn/closer.cgi/zookeeper/,当前稳定版本为3.4.8单机模式修改zookeeper配置文件zoo.cfg解压后进入conf目录,修改zoo_sample.cfg文件名... 查看详情

zookeeper安装和使用windows

的Zookeeper是以3.4.5这个稳定版本为基础,最新的版本可以通过官网 http://hadoop.apache.org/zookeeper/来获取,Zookeeper的安装非常简单,下面将从单机模式和集群模式两个方面介绍Zookeeper的Windows安装和配置.首先需要安装JdK,从Oracle的... 查看详情

zookeeper安装,zookeeper单机模式安装

http://zookeeper.apache.org/releases.html#download下载解压到(我自己的)解压到/usr/local下把名字改成zookeeper进入zookeeper目录下的conf目录,复制zoo_sample.cfg为zoo.cfg,并将内容修改如下(就是解压后的路径,其他的不用改了,这个路径一般... 查看详情

zookeeper实战之单机模式

Zookeeper介绍Zookeeper分布式服务框架是用来解决分布式应用中经常遇到的一些数据管理问题,如:统一命名服务、状态同步服务、集群管理、分布式应用配置项的管理等。本文主要从使用者角度来介绍一下Zookeeper的安装,配置及应... 查看详情

kafka单机模式部署安装,zookeeper启动

    在root的用户下1):前提安装JDK环境,设置JAVA环境变量2):下载kafka,命令:wget http://mirrors.shuosc.org/apache/kafka/0.10.2.1/kafka_2.10-0.10.2.1.tgz3):下载zookeeper,命令:wget http://mirror.bit.edu 查看详情

zookeeper安装(代码片段)

Zookeeper安装  zookeeper的安装分为三种模式:单机模式、集群模式和伪集群模式。单机模式    首先,从Apache官网下载一个Zookeeper稳定版本,本次教程采用的是zookeeper-3.4.9版本。 http://apache.fayea.com/zookeeper/zookeeper-3.4.9/&nbs... 查看详情

zookeeper的三种安装模式

zookeeper的安装分为三种模式:单机模式、集群模式和伪集群模式。1、单机模式首先,从Apache官网下载一个Zookeeper稳定版本,本次教程采用的是zookeeper-3.4.9版本。http://apache.fayea.com/zookeeper/zookeeper-3.4.9/然后解压zookeeper-3.4.9.tar.gz文... 查看详情

zookeeper安装使用--单机模式(代码片段)

1.versionpackage准备zookeeper-3.4.5.tar.gz2.mkdirzookeeperfolder.tarthepackage  mkdirzookeepertarxvfzookeeper-3.4.5.tar.gz [[email protected]zookeeper]#pwd/root/zookeeper[[email protected]zookeeper]#lltotal16024drwxr-xr-x.12501games4096Jan3007:30zookeeper-3.4.5-rw-r--r--.1... 查看详情

zookeeper集群安装部署

 zookeeper集群:zookeeper作为一个开源的分布式应用协调系统,已经用到了许多分布式项目中,用来状态同步服务、集群管理、分布式应用配置项的管理等工作。ZooKeeper的工作模式有三种:单机模式、集群模式、伪集群模式。 ... 查看详情

zookeeper学习第二期--zookeeper安装配置

一、Zookeeper的搭建方式Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境;■ 伪集群模式:就是在一台物理机上运行多个Zookeeper实例;■ 集群... 查看详情

zookeeper环境搭建(单机/集群)(转)

前提:配置文件主要是在$ZOOKEEPER_HOME/conf/zoo.cfg,刚解压时为zoo_sample.cfg,重命名zoo.cfg即可。配置文件常用项参考:http://www.cnblogs.com/EasonJim/p/7483880.html环境搭建:一、ZooKeeper的搭建方式ZooKeeper安装方式有三种,单机模式和集群模... 查看详情

8.3.zookeeper集群安装配置(代码片段)

1.Zookeeper的搭建方式Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。  单机模式:Zookeeper只运行在一台服务器上,适合测试环境;  伪集群模式:就是在一台物理机上运行多个Zookeeper实例;  集群模式:Zook... 查看详情

zookeeper的安装(代码片段)

ZooKeeper的安装ZooKeeper有两种安装模式,最简单的方式是单机模式(standalonemode),它只需要在一台机器上面运行,另一种方式是集群模式,集群模式需要多台服务器部署。1单机模式第一次安装尝试使用ZooKee... 查看详情

zookeeper的安装(代码片段)

ZooKeeper的安装ZooKeeper有两种安装模式,最简单的方式是单机模式(standalonemode),它只需要在一台机器上面运行,另一种方式是集群模式,集群模式需要多台服务器部署。1单机模式第一次安装尝试使用ZooKee... 查看详情

zookeeper的安装(代码片段)

ZooKeeper的安装ZooKeeper有两种安装模式,最简单的方式是单机模式(standalonemode),它只需要在一台机器上面运行,另一种方式是集群模式,集群模式需要多台服务器部署。1单机模式第一次安装尝试使用ZooKee... 查看详情

zookeeper的安装(代码片段)

ZooKeeper的安装ZooKeeper有两种安装模式,最简单的方式是单机模式(standalonemode),它只需要在一台机器上面运行,另一种方式是集群模式,集群模式需要多台服务器部署。1单机模式第一次安装尝试使用ZooKee... 查看详情

zookeeper的安装(代码片段)

ZooKeeper的安装ZooKeeper有两种安装模式,最简单的方式是单机模式(standalonemode),它只需要在一台机器上面运行,另一种方式是集群模式,集群模式需要多台服务器部署。1单机模式第一次安装尝试使用ZooKee... 查看详情

zookeeper的安装(代码片段)

ZooKeeper的安装ZooKeeper有两种安装模式,最简单的方式是单机模式(standalonemode),它只需要在一台机器上面运行,另一种方式是集群模式,集群模式需要多台服务器部署。1单机模式第一次安装尝试使用ZooKee... 查看详情