windows 版 apache zookeeper 3.9.2(附下载) 配置和运行
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、运行
效果如下图就是成功的: