ZooKeeper 单机版安装和配置

Zookeeper 下载链接:http://mirrors.shu.edu.cn/apache/zookeeper/

#wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz

#tar  xvzf zookeeper-3.4.14.tar.gz -C /usr/local/

#cd  /usr/local/;mv zookeeper-3.4.14 zookeeper

#useradd hadoop

#chown -R hadoop:hadoop zookeeper/

#vim /home/hadoop/.bashrc

# ZooKeeper Env

export ZOOKEEPER_HOME=/usr/local/zookeeper

export PATH=$PATH:$ZOOKEEPER_HOME/bin

#source /home/hadoop/.bashrc

#cp zookeeper/conf/zoo_sample.cfg zookeeper/conf/zoo.cfg

#vim zookeeper/conf/zoo.cfg

ticketTime=2000

clientPort=2181

dataDir=/opt/zookeeper/data

dataLogDir=/opt/zookeeper/logs

#mkdir  zookeeper/data/  zookeeper/logs/

启动zookeeper

#zookeeper/bin/zkServer.sh start

ZooKeeper JMX enabled by default

Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg

Starting zookeeper ... STARTED

# telnet 127.0.0.1 2181

Trying 127.0.0.1...

Connected to 127.0.0.1.

Escape character is '^]'.

stat

Zookeeper version: 3.4.14-4c25d480e66aadd371de8bd2fd8da255ac140bcf, built on 03/06/2019 16:18 GMT

Clients:

/127.0.0.1:49949[0](queued=0,recved=1,sent=0)

Latency min/avg/max: 0/0/0

Received: 1

Sent: 0

Connections: 1

Outstanding: 0

Zxid: 0x0

Mode: standalone

Node count: 4

Connection closed by foreign host.

# zookeeper/bin/zkServer.sh status

ZooKeeper JMX enabled by default

Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg

Mode: standalone

上一篇:python3 第二十四章 - 函数式编程之Anonymous function(匿名函数)


下一篇:解决C#中调用WCF方法报错:远程服务器返回错误 (404) 未找到