1.将zookeeper-3.4.8.tar.gz拷贝到/usr/local下,解压
#tar -zxvf zookeeper-3.4.8.tar.gz
得到zookeeper-3.4.8
2.进入zookeeper的conf文件夹下并复制一个zoo_sample.cfg为zoo.cfg
[root@localhost conf]# cp zoo_sample.cfg zoo.cfg
[root@localhost conf]# ls
configuration.xsl log4j.properties zoo.cfg zoo_sample.cfg
3.修改zoo.cfg
dataDir=/usr/local/zookeeper-3.4.8/data
并在那个目录下创建data文件夹
4.启动zookeeper
[root@localhost bin]# ./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper-3.4.8/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
5.zookeeper集群配置参考zookeeper系列其他文章。