macOS环境下安装Zookeeper笔记

本文档详细记录了在macOS环境下安装Zookeeper的过程,包括遇到的错误、解决方法以及安装后的验证步骤。首先通过命令安装Zookeeper时,需要先安装xcode-select。安装完成后,通过`brew list`和`brew info`命令检查Zookeeper的安装位置和详情。接着,创建data目录以保存数据,并编辑配置文件`zoo.cfg`。最后,启动、连接、操作和检查Zookeeper的状态,确保安装成功。
摘要由CSDN通过智能技术生成

安装Zookeeper

macOS环境下,使用homebrew方式在Mac上安装Zookeeper。记录详细流程操作。

安装应用

使用命令$ brew install zookeeper安装:

Error: The following formula:
zookeeper
cannot be installed as a binary package and must be built from source.
To continue, you must install Xcode from the App Store,
or the CLT by running:
xcode-select --install

结果报错了,提示先安装xcode-select,使用命令$ xcode-select --install

xcode-select: note: install requested for command line developer tools

安装好以后再次执行$ brew install zookeeper:

Warning: You are using OS X 10.15.7

We do not provide support for this pre-release version.

You may encounter build failures or other breakages.

Please create pull-requests instead of filing issues.

==> Downloading https://www.apache.org/dyn/closer.cgi?path=zookeeper/zookeeper-3

==> Best Mirror http://mirrors.shu.edu.cn/apache/zookeeper/zookeeper-3.6.2_1/zooke

curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror…

==> Downloading https://archive.apache.org/dist/zookeeper/zookeeper-3.6.2_1/zookee

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/zookeeper/3.6.2_1 --without-cppunit

==> make install

==> Caveats

To have launchd start zookeeper now and restart at login:

brew services start zookeeper
Or, if you don’t want/need a background service you can just run:

zkServer start

==> Summary

🍺 /usr/local/Cellar/zookeeper/3.6.2_1: 991 files, 33.2MB, built in 52 seconds

可以使用$ brew list zookeeper 查看zookeeper文件位置

test-MBP:~ test$ brew list zookeeper
/usr/local/Cellar/zookeeper/3.6.2_1/.bottle/etc/ (2 files)
/usr/local/Cellar/zookeeper/3.6.2_1/bin/zkCleanup
/usr/local/Cellar/zookeeper/3.6.2_1/bin/zkCli
/usr/local/Cellar/zookeeper/3.6.2_1/bin/zkServer
/usr/local/Cellar/zookeeper/3.6.2_1/bin/zkServer-initialize
/usr/local/Cellar/zookeeper/3.6.2_1/bin/zkSnapShotToolkit
/usr/local/Cellar/zookeeper/3.6.2_1/bin/zkTxnLogToolkit
/usr/local/Cellar/zookeeper/3.6.2_1/homebrew.mxcl.zookeeper.plist
/usr/local/Cellar/zookeeper/3.6.2_1/include/zookeeper/ (6 files)
/usr/local/Cellar/zookeeper/3.6.2_1/lib/libzookeeper_mt.2.dylib
/usr/local/Cellar/zookeeper/3.6.2_1/lib/libzookeeper_st.2.dylib
/usr/local/Cellar/zookeeper/3.6.2_1/lib/ (4 other files)
/usr/local/Cellar/zookeeper/3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值