zookeeper的安装
Posted 慧强杨
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zookeeper的安装相关的知识,希望对你有一定的参考价值。
1、zookeeper的下载
官网下载地址 https://zookeeper.apache.org/releases.html
下载到本地
2、zookeeper的安装
下载后解压文件:如zookeeper-3.4.6
开始安装:
1、进入zookeeper-3.4.6\\conf路径下将zoo_example.cfg文件改名为zoo.cfg
2、修改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:\\\\software\\\\zookeeper-3.4.6\\\\data
dataLogDir=D:\\\\software\\\\zookeeper-3.4.6\\\\log
# the port at which the clients will connect
clientPort=2181
#
# 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
3、需要注意的地方是
dataDir=D:\\\\software\\\\zookeeper-3.4.6\\\\data
dataLogDir=D:\\\\software\\\\zookeeper-3.4.6\\\\log
clientPort=2181
4、启动zookeeper,bin/zkServer.cmd双击打开
5、启动zkCli.cmd,测试是否安装成功
安装过程中遇到的问题:zkServer启动一闪而过:原因分析:1、没有修改zoo.cfg文件;2、修改文件后没有在本地创建data,log两个目录。
以上是关于zookeeper的安装的主要内容,如果未能解决你的问题,请参考以下文章
Zookeeper 从入门到精通Zookeeper 下载安装及配置
Zookeeper -- 初识ZookeeperZookeeper的安装和配置Zookeeper命令操作(Zookeeper数据模型 Zookeeper服务端 / 客户端常用命令)