windows环境下安装 zookeeper
我们下载下来的zookeeper的安装包是.tar.gz格式的,但是还是可以在windows下运行。
下载地址 http://mirrors.hust.edu.cn/apache/zookeeper/
下载stable路径下的版本
把下载的zookeeper的文件解压到指定目录
C:\zookeeper-3.4.6
Zookeeper 的配置文件在 conf 目录下,这个目录下有 zoo_sample.cfg 和 log4j.properties,你需要做的就是将 zoo_sample.cfg 改名为 zoo.cfg,因为 Zookeeper 在启动时会找这个文件作为默认配置文件。
配置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. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=C:\\zookeeper\\data dataLogDir=C:\\zookeeper\\log # 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=1server.1=127.0.0.1:2888:3888
- tickTime:这个时间是作为 Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个 tickTime 时间就会发送一个心跳。
- dataDir:顾名思义就是 Zookeeper 保存数据的目录,默认情况下,Zookeeper 将写数据的日志文件也保存在这个目录里。
- dataLogDir:顾名思义就是 Zookeeper 保存日志文件的目录
- clientPort:这个端口就是客户端连接 Zookeeper 服务器的端口,Zookeeper 会监听这个端口,接受客户端的访问请求。
当这些配置项配置好后,你现在就可以启动 Zookeeper 了,启动后要检查 Zookeeper 是否已经在服务,可以通过 netstat – ano 命令查看是否有你配置的 clientPort 端口号在监听服务。
使用DOS窗口开启服务,直接进bin目录双击启动会有问题,不明白
进入到bin目录,并且启动zkServer.cmd,这个脚本中会启动一个Java进程
启动后jps可以看到QuorumPeerMain的进程
启动客户端运行查看一下
验证服务是否启动,使用telnet命令
然后输入stat
windows环境下安装 zookeeper的更多相关文章
- windows环境下安装ZooKeeper
$.说明 ZooKeeper: ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件. 它是一个为分布式 ...
- 在 windows 环境下安装 redislive
这是一篇在 windows 环境下安装 redislive 的教程! 项目地址:https://github.com/nkrode/RedisLive 配置文档:http://www.nkrode.c ...
- Windows环境下安装PHPUnit
Windows环境下安装PHPUnit,在此整理一下,以便大家参考. 本人测试安装环境:Windows7(win32) + Apache(2.2.13) + PHP(5.3.6) 1. 以管理员 ...
- Nginx——在Windows环境下安装
下载 Nginx是开源软件,用户可以访问 http://nginx.org/ 网站获取源码包或Windows二进制文件下载.其中1.13.x版本为开发版本,1.12.0版本为稳定版本.开发版本分支会较 ...
- 在windows环境下安装redis和phpredis的扩展
在windows环境下安装redis和phpredis的扩展 1.首先配置php: 需要在windows的集成环境中找到php的扩展文件夹,ext,然后在网上寻找自己的php对应的.dll文件 比如说 ...
- windows环境下安装yaf框架
windows环境下安装yaf框架 在windows下安装yaf框架 准备工作: php环境(过程略,wamp,xampp,phpstudy都行,php版本大于5.3) git工具(需要从github ...
- ElasticHD Windows环境下安装
ElasticHD Linux环境下安装教程 ElasticHD windows环境下安装教程 习惯了T-SQL 查询,Elasticsearch的DSL查询语法简直就是反人类呀,一 ...
- RabbitMQ,Windows环境下安装搭建
切入正题:RabbitMQ的Windows环境下安装搭建 一.首先安装otp_win64_20.1.exe,,, 二.然后安装,rabbitmq-server-3.6.12.exe, 安装完成后,在服 ...
- 如何在Windows环境下安装Linux系统虚拟机
如何在Windows环境下安装Linux系统虚拟机 本篇经验写给想要入门学习C语言的小白们.Windows系统因为使用窗口图形化,操作简单,功能多样,所以我们在Windows环境下可以做到很多,但想要 ...
随机推荐
- php判断ip黑名单程序代码
学校的新闻系统要求有些新闻只开放校内ip浏览,于是重写了一个代码来实现此功能,实现后的结果是,只要把允许访问的ip列入ip.txt这个文件中即可,同时支持c类ip,例如: ip.txt192.1682 ...
- matlab实现高斯消去法、LU分解
朴素高斯消去法: function x = GauElim(n, A, b) if nargin < 2 for i = 1 : 1 : n for j = 1 : 1 : n A(i, j) ...
- Linux进程操作信息
Linux进程操作简单小结 linux上进程有5种状态: 1. 运行(正在运行或在运行队列中等待) 2. 中断(休眠中, 受阻, 在等待某个条件的形成或接受到信号) 3. 不可中断(收到信号不唤醒和不 ...
- C# 获取数组的子集
private static void PrintSubItems(int[] source) { int i = 1; int total = int.Parse(Math.Pow(2, sourc ...
- Extmail maildrop错误
错误: <liuyb@5teacher.com>: Command died with status 127: "maildrop". Command output: ...
- windows 2012 服务器打开ping端口,开通远程连接
windows 2012 服务器打开ping端口,开通远程桌面连接 控制面板->系统与安全->高级防火墙->入站规则 找到:windows 远程桌面 (http in ) 右键启用 ...
- .NET4安装总进度一直不动的解决办法
在安装.NET4时遇到上面的进度在动,而安装进度一直停在0,解决办法: 禁止并关闭Window Update服务,重新运行安装程序. 关闭服务:控制面板->管理工具->服务->Win ...
- [Query Intent] segmenting-search-intent
http://moz.com/blog/segmenting-search-intent Today I'd like to take a deep look inside the minds of ...
- sqlserver convert 日期时间 转换格式化
Select CONVERT(varchar(100), GETDATE(), 120): 2006-05-16 10:57:49 Select CONVERT(varchar(100), GET ...
- 【UVA】【11427】玩纸牌
数学期望 也是刘汝佳老师白书上的例题……感觉思路很神奇啊 //UVA 11427 #include<cmath> #include<cstdio> #include<cs ...