您的位置:首页 > 其它

zookeeper (-)Max下安装

2016-04-21 16:00 204 查看

Mac 上查看zookeeper

$ brew info zookeeper

zookeeper: stable 3.4.8 (bottled), HEAD
Centralized server for distributed coordination of services https://zookeeper.apache.org/ Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/zookeeper.rb ==> Options
--with-perl
Build Perl bindings
--with-python
Build with python support
--HEAD
Install HEAD version
==> Caveats
To have launchd start zookeeper at login:
ln -sfv /usr/local/opt/zookeeper/*.plist ~/Library/LaunchAgents
Then to load zookeeper now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.zookeeper.plist
Or, if you don't want/need launchctl, you can just run:
zkServer start


安装

$ brew install zookeeper

==> Downloading https://homebrew.bintray.com/bottles/zookeeper-3.4.8.yosemite.bottle.tar.gz ######################################################################## 100.0%
==> Pouring zookeeper-3.4.8.yosemite.bottle.tar.gz
==> Caveats
To have launchd start zookeeper at login:
ln -sfv /usr/local/opt/zookeeper/*.plist ~/Library/LaunchAgents
Then to load zookeeper now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.zookeeper.plist
Or, if you don't want/need launchctl, you can just run:
zkServer start
==> Summary
��  /usr/local/Cellar/zookeeper/3.4.8: 237 files, 17.6M'

$ cd /usr/local/Cellar/zookeeper/3.4.8
$ ls
CHANGES.txt                   LICENSE.txt                   README.txt                    homebrew.mxcl.zookeeper.plist lib
INSTALL_RECEIPT.json          NOTICE.txt                    bin                           include                       libexec


安装成功,进入 /usr/local/Cellar/zookeeper目录即可查看到,已经有了缺省的配置文件。

启动服务

# 启动
$ zkServer  start
ZooKeeper JMX enabled by default
Using config: /usr/local/etc/zookeeper/zoo.cfg
Starting zookeeper ... STARTED

# 查看状态
$ zkServer  status
ZooKeeper JMX enabled by default
Using config: /usr/local/etc/zookeeper/zoo.cfg
Mode: standalone

# 查看运行状态
$ zkCli
Connecting to localhost:2181
Welcome to ZooKeeper!
JLine support is enabled
[zk: localhost:2181(CONNECTING) 0]
WATCHER::
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  zookeeper