1 下载zookeeper
http://download.csdn.net/detail/lf_214/9474583
2 将zookeeper解压到指定目录
并在zookeeper下创建data和logs两个文件夹。
3 修改zookeeper的配置文件
将zookeeper/conf下的zoo_sample.cfg文件复制一份,修改为zoo.cfg,编辑以下内容:
dataDir=%zookeeper的路径%/data
dateLogDir=%zookeeper的路径%/logs
server.1=127.0.0.1:2888:3888
4 添加myid文件到data文件夹下,并编辑内容为1
5 启动zookeeper
linux:zkServer.sh start
win:zkServer.cmd