1、下载zookeeper并解压
用cdh5.3.0对应的版本
2、参数配置
进入zookeeper/conf:
$:vim zoo.cfg
若没有上述文件,则
$:cp zoo_sample.cfg zoo.cfg
# The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. dataDir=/home/hadoop/zookeeper/data # the port at which the clients will connect clientPort=2181 server.1=gdc-nn01-test:2888:3888 server.2=gdc-dn01-test:2888:3888 server.3=gdc-dn02-test:2888:3888
原文地址:http://blog.csdn.net/jinhong_lu/article/details/46519899