博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ZooKeeper 安装与部署
阅读量:5875 次
发布时间:2019-06-19

本文共 3058 字,大约阅读时间需要 10 分钟。

一、下载

下载地址:

 

二、安装

直接解压到期望文件夹。

 

三、配置

在解压后的文件夹中添加两个目录,data和logs,用于存储数据与日志。

文件夹conf中,存放配置文件,现有一个名为zoo_sample.cfg的文件,这是示例配置文件。

新建配置文件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=E:\\environment\\zookeeper\\apache-zookeeper-3.5.5\\data
dataLogDir=E:\\environment\\zookeeper\\apache-zookeeper-3.5.5\\logs
# the port at which the clients will connect
clientPort=2181

 

四、启动

打开命令提示符,进入bin目录,输入zkServer启动。

E:\environment\zookeeper\apache-zookeeper-3.5.5\bin>zkServerE:\environment\zookeeper\apache-zookeeper-3.5.5\bin>call "C:\Program Files\Java\jdk1.8.0_181"\bin\java "-Dzookeeper.log.dir=E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\logs" "-Dzookeeper.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-Kuningasic-server-DESKTOP-KJCEOIF.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f" -cp "E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\build\classes;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\build\lib\*;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\*;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\lib\*;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf\zoo.cfg"2019-06-12 20:56:27,191 [myid:] - INFO  [main:QuorumPeerConfig@133] - Reading configuration from: E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf\zoo.cfg2019-06-12 20:56:27,201 [myid:] - INFO  [main:QuorumPeerConfig@385] - clientPortAddress is 0.0.0.0/0.0.0.0:21812019-06-12 20:56:27,201 [myid:] - INFO  [main:QuorumPeerConfig@389] - secureClientPort is not set2019-06-12 20:56:27,204 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 32019-06-12 20:56:27,206 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 02019-06-12 20:56:27,206 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.2019-06-12 20:56:27,206 [myid:] - WARN  [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running  in standalone mode2019-06-12 20:56:27,208 [myid:] - INFO  [main:ManagedUtil@46] - Log4j found with jmx enabled.2019-06-12 20:56:27,286 [myid:] - INFO  [main:QuorumPeerConfig@133] - Reading configuration from: E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf\zoo.cfg2019-06-12 20:56:27,286 [myid:] - INFO  [main:QuorumPeerConfig@385] - clientPortAddress is 0.0.0.0/0.0.0.0:21812019-06-12 20:56:27,287 [myid:] - INFO  [main:QuorumPeerConfig@389] - secureClientPort is not set2019-06-12 20:56:27,287 [myid:] - INFO  [main:ZooKeeperServerMain@117] - Starting server

转载于:https://www.cnblogs.com/Currention/p/11012702.html

你可能感兴趣的文章
2016教师节微信祝福语大全
查看>>
【转】随机函数的rand、srand用法
查看>>
Nginx: could not build the server_names_hash 解决办法
查看>>
P4factory <Integration with Mininet>
查看>>
Ubuntu16.04下搭建Go语言环境
查看>>
.NetCore~Linux环境下部署
查看>>
eclipse调试(debug)的时候,出现Source not found,Edit Source Lookup Path,一闪而过
查看>>
Html5视频播放器-VideoJS+Audio标签实现视频,音频及字幕同步播放
查看>>
Kafka消息模拟器
查看>>
Linux常用基本命令(cat)
查看>>
HTML5 Canvas游戏开发实战
查看>>
转-玩转git,让git成为个人工作备份利器
查看>>
extjs4 系列文章
查看>>
nginx设置http代理
查看>>
【C011】Python - 基础教程学习(二)
查看>>
byte数组转换成16进制字符串和字符数组的方法
查看>>
(转)介绍下Nuget在传统Asp.net项目中的使用
查看>>
解决Please check that your locale settings
查看>>
FineUI v3.2.1发布了!(距离上个版本仅 7 天,给不给力?)
查看>>
How to load data into SAP HANA database
查看>>