安装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