惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
O
OpenAI News
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cisco Blogs
AWS News Blog
AWS News Blog
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
美团技术团队
T
Threatpost
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
Blog — PlanetScale
Blog — PlanetScale
C
Cybersecurity and Infrastructure Security Agency CISA
F
Full Disclosure
博客园_首页
N
Netflix TechBlog - Medium
Security Latest
Security Latest
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Announcements
Recent Announcements
博客园 - Franky
P
Palo Alto Networks Blog
Project Zero
Project Zero
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
H
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
GbyAI
GbyAI

博客园 - 安安

macOS 10.13允许任何来源开启方法 mac系统如何处理来自身份不明的开发者 依赖注入 与 控制反转 捷波朗 jabra BT3030 蓝牙耳机 罗技 UE3100 蓝牙耳机使用 代理服务器 Eclipse快捷键 Html5的表单 host asp.net程序的小型IIS msdn windows 电驴资源(转) Zookeeper .Net Client 使用 Windows与Linux拷贝数据 ContOS Linux下VNC Server远程桌面配置详细 搭建自己的NuGet服务器 Zookeeper安装 实现CentOS 中的单窗口打开文件夹 运行jar程序批处理bat程序编写 设置Eclipse的Maven库 maven jetty的eclipse 插件
Windows 下 Zookeeper 启动脚本
安安 · 2012-09-25 · via 博客园 - 安安

1. 下载地址
http://apache.etoak.com/zookeeper/
当前最新版:
http://apache.etoak.com/zookeeper/zookeeper-3.4.4/

2. 解压到

C:\myserver\zookeeper-3.4.4\

3. 修改配置

其中 单机模式不需要  initLimit 、syncLimit 设置

tickTime=2000
dataDir=C:\\myserver\\zookeeper-3.4.4\\data
dataLogDir=C:\\myserver\\zookeeper-3.4.4\\log
clientPort=2181

4. 启动脚本start.bat

setlocal
set ZOOCFGDIR=%~dp0%../conf
set ZOO_LOG_DIR=%~dp0%..
set ZOO_LOG4J_PROP=INFO,CONSOLE
set CLASSPATH=%ZOOCFGDIR%
set CLASSPATH=%~dp0../*;%~dp0../lib/*;%CLASSPATH%
set CLASSPATH=%~dp0../build/classes;%~dp0../build/lib/*;%CLASSPATH%
set ZOOCFG=%ZOOCFGDIR%/zoo.cfg
set ZOOMAIN=org.apache.zookeeper.server.ZooKeeperServerMain
java "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %* 
endlocal

5. 双击 start.bat 启动,运行联网

6. 在cmd下利用 netstat -ano 查看启动情况

7. 客户端连接

8. 以上是 Zookeeper 单机运行模式,Zookeeper 的集群模式的安装和配置也不是很复杂,增加参数initLimit 、syncLimit 设置

    配置如下:

tickTime=2000
initLimit=5
syncLimit=2
dataDir=C:\\myserver\\zookeeper-3.4.4\\data
dataLogDir=C:\\myserver\\zookeeper-3.4.4\\log
clientPort=2181
server.1=192.168.1.1:2888:3888
server.2=192.168.1.2:2888:3888 

9. 在 “dataDir=C:\\myserver\\zookeeper-3.4.4\\data” 目录下建立myid文件(建立文本文件,去掉扩展名txt即可)

设置myid

在每台机器上配置的dataDir指定的目录下面,创建一个myid文件,里面内容为一个数字,用来标识当前主机,conf/zoo.cfg文件中配置的server.X中X为什么数字,则myid文件中就输入这个数字,
例如:

在192.168.1.1机器上根据“server.1=192.168.1.1:2888:3888” 设置为 1
在192.168.1.2机器上根据“server.2=192.168.1.2:2888:3888” 设置为 2

两篇好文:
http://www.blogjava.net/hello-yun/archive/2012/05/03/377250.html

http://hi.baidu.com/fengzhichao7/item/ef381f1ac8a45b09e65c36d4

其他参考
http://space.itpub.net/8183550/viewspace-683571
http://www.cnblogs.com/SophiaTang/archive/2012/03/09/2387294.html