Tus*_*tap 4 java windows apache-zookeeper
我在 Windows 环境中运行 Zookeeper 时遇到一些困难。
我下载了zookeeper 3.4.6。提取出来了 在conf文件夹中创建了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=/tmp/zookeeper
# 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
Run Code Online (Sandbox Code Playgroud)
然后我尝试从 bin 文件夹运行 zkServer.cmd 。但我不确定这是否能运行。
如何测试 Zookeeper Server 是否在 Windows 上运行?
小智 5
如果您想查看结果,请以管理员身份从 Windows 命令行工具运行 zkServer.cmd,而不是通过单击它最终会关闭,您将无法看到结果。
另外,您应该将 dataDir 更新为有效的 Windows 目录,格式为C:/tmp/...。
在命令行上,调用 zkServer.cmd 后,您应该能够在命令行上看到不同的 [INFO] 消息,最后一条绑定到端口 0.0.0.0/0.0.0.0:2181。
| 归档时间: |
|
| 查看次数: |
12419 次 |
| 最近记录: |