亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

windows系統(tǒng)搭建zookeeper服務(wù)器的教程

 更新時(shí)間:2019年10月21日 08:45:39   作者:快樂地編程  
這篇文章主要介紹了windows系統(tǒng)搭建zookeeper服務(wù)器的教程,本文圖文并茂給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

安裝&配置

在apache的官方網(wǎng)站提供了好多鏡像下載地址,然后找到對應(yīng)的版本

下載地址:

http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz

Windows下安裝

把下載的zookeeper的文件解壓到指定目錄

C:\ZK\zookeeper-3.4.14>

修改conf下增加一個zoo.cfg

內(nèi)容如下:

# 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 anacknowledgement
syncLimit=5
# the directory where the snapshot isstored. //鏡像數(shù)據(jù)位置
dataDir=C:\\ZK\\data\\zookeeper
#日志位置
dataLogDir=C:\\ZK\\logs\\zookeeper
# the port at which the clients willconnect 客戶端連接的端口
clientPort=2181

注:如果啟動有報(bào)錯提示cfg文件有錯誤,可以用zoo_sample.cfg內(nèi)內(nèi)容替代也是可以的

進(jìn)入到bin目錄,并且啟動zkServer.cmd,這個腳本中會啟動一個java進(jìn)程

C:\ZK\zookeeper-3.4.14>cd bin

C:\ZK\zookeeper-3.4.14\bin>

C:\ZK\zookeeper-3.4.14\bin >zkServer.cmd 

啟動后jps可以看到QuorumPeerMain的進(jìn)程

C:\ZK\zookeeper-3.4.14\bin >jps

啟動客戶端運(yùn)行查看一下

C:\ZK\zookeeper-3.4.14\bin>zkCli.cmd -server 127.0.0.1:2181

這個時(shí)候zookeeper已經(jīng)安裝成功了,

參考官方文檔:

http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html

 參考單機(jī)模式、集群和偽集群的帖子

http://sqcjy111.iteye.com/blog/1741320

在 一臺機(jī)器上通過偽集群運(yùn)行時(shí)可以修改 zkServer.cmd 文件在里面加入

set ZOOCFG=..\conf\zoo1.cfg  這行,另存為  zkServer-1.cmd

如果有多個可以以此類推


還需要 在對應(yīng)的

C:\\ZK\\data\\zookeeper\\1,

C:\\ZK\\data\\zookeeper\\2,

C:\\ZK\\data\\zookeeper\\3

 建立一個文本文件命名為myid,內(nèi)容就為對應(yīng)的zoo.cfg里server.后數(shù)字

 

總結(jié)

以上所述是小編給大家介紹的windows系統(tǒng)搭建zookeeper服務(wù)器的教程,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時(shí)回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
如果你覺得本文對你有幫助,歡迎轉(zhuǎn)載,煩請注明出處,謝謝!

相關(guān)文章

最新評論