日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

zookeeper安装( windows环境)

發布時間:2025/3/20 windows 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 zookeeper安装( windows环境) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.下載

Apache官方最新版本為:3.4.8
下載地址:http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.8/zookeeper-3.4.8.tar.gz
下載后并解壓到你指定的磁盤位置

2.將conf下的zoo_sample.cfg改名為zoo.cfg

之所以要這么做,是因為zookeeper默認的配置文件名就叫zoo.cfg

3.自定義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=D:\\zookeeper\\data dataLogDir=D:\\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=1

1、tickTime:這個時間是作為 Zookeeper 服務器之間或客戶端與服務器之間維持心跳的時間間隔,也就是每個 tickTime 時間就會發送一個心跳。
2、dataDir:顧名思義就是 Zookeeper 保存數據的目錄,默認情況下,Zookeeper 將寫數據的日志文件也保存在這個目錄里。
3、dataLogDir:顧名思義就是 Zookeeper 保存日志文件的目錄
4、clientPort:這個端口就是客戶端連接 Zookeeper 服務器的端口,Zookeeper 會監聽這個端口,接受客戶端的訪問請求。

4.查看bin目錄下的zkEvn.cmd里的JAVA_HOME名字對不對

set JAVA="%JAVA_HOME%"\bin\java

如果這個名字與你之前安裝JDK配置的環境變量的名字不對,那么就會因為找到JDK而報錯

5.啟動

需要注意的是,windows環境下需要啟動的是windows命令腳 本,而不是shell命令腳本

雙擊zkServer.cmd,會啟動一個java進程,即服務端
雙擊zkCli.cmd,會啟動一個客戶端

總結

以上是生活随笔為你收集整理的zookeeper安装( windows环境)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。