百度网盘
通过网盘分享的文件:zookeeper_linux
链接: https://pan.baidu.com/s/1_hybXZVwTRkotz0VbwbSMw?pwd=8888 提取码: 8888
1.将压缩包拖进虚拟机

2.解压压缩包
cd /ruanjian/zookeeper/
tar -zxvf apache-ZooKeeper-3.7.2-bin.tar.gz

3. 进入到conf目录
cd /ruanjian/zookeeper/apache-zookeeper-3.7.2-bin/conf/
4.拷贝
cp zoo_sample.cfg zoo.cfg

5.创建zkdata文件夹,/ruanjian/zookeeper/
cd /ruanjian/zookeeper/
mkdir zkdata
鼠标右键创建文件夹就行

6.修改zoo.cfg,可以鼠标右键用文本编辑器打开

7.修改存储目录

8.启动zookeeper
cd /ruanjian/zookeeper/apache-zookeeper-3.7.2-bin/bin/
./zkServer.sh start
9.查看zookeeper状态
./zkServer.sh status
启动 ZooKeeper 服务: ./zkServer.sh start
查看 ZooKeeper 服务状态: ./zkServer.sh status
停止 ZooKeeper 服务: ./zkServer.sh stop
重启 ZooKeeper 服务: ./zkServer.sh restart
- 连接ZooKeeper服务端:./zkCli.sh -server 127.0.0.1:2181