windows 版 apache zookeeper 3.9.2(附下载) 配置和运行

windows 版 apache zookeeper 3.9.2(附下载) 配置和运行

经验文章nimo972025-01-13 11:00:3317A+A-

1、下载 windows 版 apache zookeeper 中间件

打开 https://zookeeper.apache.org/releases.html#download下载最新稳定版本或找个合适的稳定版本。

当前最新稳定版本为 Apache ZooKeeper 3.9.2,点击 Apache ZooKeeper 3.9.2 链接。


点击 https://dlcdn.apache.org/zookeeper/zookeeper-3.9.2/apache-zookeeper-3.9.2-bin.tar.gz,即可下载。

2、解压 apache-zookeeper-3.9.2-bin.tar.gz

根目录结构(如下图):

3、自定义配置

3.1、打开 conf 文件夹,把 zoo_sample.cfg 文件拷贝一份并把文件名称修改为 zoo.cfg。

3.2、修改 zoo.cfg 文件

把 dataDir=/tmp/zookeeper 改为 dataDir=./data

添加日志路径 dataLogDir=./logs


3.3、创建有标题的 bat

如果一台服务器运行多个用 cmd 打开的服务,就不好区分哪个是 apache-zookeeper 的 bat 了,所以才需要 自建 zookeeper.bat,脚本如下:

title zookeeper

bin\zkServer.cmd

pause

3.4、运行

效果如下图就是成功的:


如果觉得这篇文章对你有所启发,不妨关注成为粉丝,转发一下,点个赞,收藏一下,这些将会成为我创作的动力源泉。

点击这里复制本文地址 以上内容由nimo97整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!
qrcode

尼墨宝库 © All Rights Reserved.  蜀ICP备2024111239号-7