1.显示软件源信息
brew info zookeeper
2.执行安装命令
brew install zookeeper
3.查看缺省配置文件,注意监听端口和ip地址
cd /usr/local/etc/zookeeper/
less -N /usr/local/etc/zookeeper/zoo.cfg
4.查看zookeeper状态
zkServer status
5.启动服务
zkServer start
6.停止服务
zkServer stop
7.使用zkCli工具
keyboaronedeMBP:zookeeper keyboardone$ zkCli
Connecting to localhost:2181
Welcome to ZooKeeper!
JLine support is enabled
[zk: localhost:2181(CONNECTING) 0]
WATCHER::
WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0]
网友评论