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