zookeeper单机模式部署
下载zookeeper安装包http://mirror.bit.edu.cn/apache/zookeeper/上传至linux服务器的opt目录下解压tar文件$ cd opt/$ tar -zxf zookeeper-3.4.14.tar.gz$ cd zookeeper-3.4.14$ mkdir data创建配置文件zoo.cfg$ vi /opt/zookeeper...
·
下载zookeeper安装包
http://mirror.bit.edu.cn/apache/zookeeper/
上传至linux服务器的opt目录下
解压tar文件
$ cd opt/
$ tar -zxf zookeeper-3.4.14.tar.gz
$ cd zookeeper-3.4.14
$ mkdir data
创建配置文件zoo.cfg
$ vi /opt/zookeeper-3.4.14/conf/zoo.cfg
tickTime = 2000
dataDir = /opt/zookeeper-3.4.14/data
clientPort = 2181
initLimit = 5
syncLimit = 2
启动zookeeper
$ /opt/zookeeper-3.4.14/bin/zkServer.sh start
执行此命令后,你将收到以下响应
$ JMX enabled by default
$ Using config: /Users/../zookeeper-3.4.6/bin/../conf/zoo.cfg
$ Starting zookeeper ... STARTED
停止zookeeper
$ /opt/zookeeper-3.4.14/bin/zkServer.sh stop
启动CLI
$ /opt/zookeeper-3.4.14/bin/zkCli.sh
响应结果如下
Connecting to localhost:2181
................
................
................
Welcome to ZooKeeper!
................
................
WATCHER::
WatchedEvent state:SyncConnected type: None path:null
[zk: localhost:2181(CONNECTED) 0]
更多推荐
已为社区贡献1条内容
所有评论(0)