win下载安装zookeeper
源:http://www.cxyclub.cn/n/45201/
评:
ZooKeeper是Hadoop的正式子项目,它是一个针对大型分布式系统的可靠协调系统,提供的功能包括:配置维护、名字服务、分布式同步、组服务等。ZooKeeper的目标就是封装好复杂易出错的关键服务,将简单易用的接口和性能高效、功能稳定的系统提供给用户
下载
http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.3.6/zookeeper-3.3.6.tar.gz
解压
进入${zookeeper}/config
重新命名zoo_sample.cfg-->zoo.cfg
修改dataDir=/tmp/zookeeper-->dataDir=F:\\taobao\\zookeeper-3.3.6\\data
新增dataLogDir=F:\\taobao\\zookeeper-3.3.6\\logs
其余的不用改
Cmd命令行进入到${zookeeper}/bin
F:\taobao\zookeeper-3.3.6\bin>zkServer.cmd
看到控制打印出一串信息
F:\taobao\zookeeper-3.3.6\bin>zkCli.cmd-server127.0.0.1:2181
Connectingto127.0.0.1:2181
2014-05-2519:13:29,311-INFO[main:Environment@97]-Clientenvironment:zooke
eper.version=3.3.6-1366786,builton07/29/201206:22GMT
2014-05-2519:13:29,314-INFO[main:Environment@97]-Clientenvironment:host.
name=E97M3HS2ANMGCSZ
2014-05-2519:13:29,315-INFO[main:Environment@97]-Clientenvironment:java.
version=1.8.0_05
2014-05-2519:13:29,315-INFO[main:Environment@97]-Clientenvironment:java.
vendor=OracleCorporation
2014-05-2519:13:29,315-INFO[main:Environment@97]-Clientenvironment:java.
home=C:\ProgramFiles\Java\jre8
。。。。。。
总之没有错误信息表示成功了。
不关闭当前窗口,另外打开一个cmd命令行
进入${zookeeper}/bin
F:\taobao\zookeeper-3.3.6\bin>zkCli.cmd-server127.0.0.1:2181
控制台没有保存表示成功
。。。。
[zk:127.0.0.1:2181(CONNECTED)0]
WATCHER::
WatchedEventstate:SyncConnectedtype:Nonepath:null
输入ls
WatchedEventstate:SyncConnectedtype:N
ls
ZooKeeper-serverhost:portcmdargs
statpath[watch]
setpathdata[version]
lspath[watch]
delquota[-n|-b]path
ls2path[watch]
setAclpathacl
setquota-n|-bvalpath
history
redocmdno
printwatcheson|off
deletepath[version]
syncpath
listquotapath
getpath[watch]
create[-s][-e]pathdataacl
addauthschemeauth
quit
getAclpath
close
connecthost:port
[zk:127.0.0.1:2181(CONNECTED)1]ls/
[zookeeper]
[zk:127.0.0.1:2181(CONNECTED)2]
这样zookeeper就按照好了。