Apache Zookeeper 下载和安装

2021-01-14  本文已影响0人  acc8226

Apache ZooKeeper 是一个开发和维护开源服务器的项目,它支持高度可靠的分布式协调。

下载地址

北京理工大学 开源软件镜像服务
https://mirror.bit.edu.cn/web/

清华大学开源软件镜像站 | Tsinghua Open Source Mirror
https://mirrors.tuna.tsinghua.edu.cn/

北京外国语大学开源软件镜像站 | BFSU Open Source Mirror
https://mirrors.bfsu.edu.cn/

zookeeper-3.4.14 下载地址
https://mirrors.bfsu.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz

Zookeeper 3.5启动时 8080端口被占用

通过查阅 Zookeeper3.5的官方文档,发现这是Zookeeper3.5的新特性:

New in 3.5.0: The AdminServer is an embedded Jetty server that provides an HTTP interface to the four letter word commands. By default, the server is started on port 8080, and commands are issued by going to the URL "/commands/[command name]", e.g., http://localhost:8080/commands/stat. The command response is returned as JSON. Unlike the original protocol, commands are not restricted to four-letter names, and commands can have multiple names; for instance, "stmk" can also be referred to as "set_trace_mask". To view a list of all available commands, point a browser to the URL /commands (e.g., http://localhost:8080/commands). See the AdminServer configuration options for how to change the port and URLs.

这是Zookeeper AdminServer,默认使用 8080 端口,它的配置属性如下:

我们可以修改在zoo.cfg中修改AdminServer的端口:

admin.serverPort=8888

保存后,再次启动,Zookeeper启动成功。

这是 zookeeper 自己搞了一个简易应用服务器,可以查看一些信息

listint and issuing commands
http://localhost:8888/commands

Zookeeper数据查看工具 ZooInspector

  1. 下载 https://issues.apache.org/jira/secure/attachment/12436620/ZooInspector.zip

  2. 进入目录ZooInspector\build,运行zookeeper-dev-ZooInspector.jar

  3. 点击左上角连接按钮,输入zk服务地址:ip或者主机名:2181

上一篇下一篇

猜你喜欢

热点阅读