zookeeper单机版安装
https://zookeeper.apache.org/releases.html
选择Apache ZooKeeper 3.8.1(asc, sha512)
mkdir -p /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/data
tar -zxvf apache-zookeeper-3.8.1-bin.tar.gz -C /usr/local/zookeeper
cp /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/conf/zoo_sample.cfg /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/conf/zoo.cfg
dataDir=/usr/local/zookeeper/apache-zookeeper-3.8.1-bin/data
sh /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/zkServer.sh start
[root@localhost zookeeper]# sh /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[root@localhost zookeeper]#
sh /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/zkServer.sh status
[root@localhost zookeeper]# sh /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone
[root@localhost zookeeper]#
sh /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/zkServer.sh stop
[root@localhost zookeeper]# sh /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/zkServer.sh stop
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/apache-zookeeper-3.8.1-bin/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
[root@localhost zookeeper]#