1.下载zk软件
http://www.apache.org/dyn/closer.cgi/zookeeper/
2.解压压缩包
1 | # tar zxvf zookeeper-3.4.13.tar.gz |
3.创建zoo.cfg
1 | # cd zookeeper-3.4.13/conf |
4.获取zk的路径
1 | # pwd |
/home/software/zookeeper-3.4.13
5.修改zoo.cfg
1 | # vim zoo.cfg |
设置dataDir=/home/software/zookeeper-3.4.13/data
6.zk启动、关闭、查看状态
1 | # cd bin |
- 启动
1 | # ./zkServer.sh start |
- 关闭
1 | # ./zkServer.sh stop |
- 查看状态
1 | # ./zkServer.sh status |