1.下载 wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.7.0/apache-zookeeper-3.7.0.tar.gz
2.解压tar xf apache-zookeeper-3.7.0.tar.gz
3.mkdir /opt/hyzk
4.mv apache-zookeeper-3.7.0 /opt/hyzk/
5.cd /opt/hyzk/apache-zookeeper-3.7.0/conf
6.cp zoo_sample.cfg zoo.cfg
7.dataDir=/var/hy/zk
8.增加集群
server.1=node1:2888:3888
server.2=node2:2888:3888
server.3=node3:2888:3888
server.4=node4:2888:3888
9. mkdir -p /var/hy/zk
10.vim myid 1
10. scp -r ./hyzk/ 192.168.56.131:`pwd`
11.mkdir -p /var/hy/zk
12.echo 2 > /var/hy/zk/myid
13.vim /etc/profile
14.export ZOOKEEPER_HOME=/opt/hyzk/apache-zookeeper-3.7.0
15.export PATH=$PATH:$JAVA_HOME/bin:$ZOOKEEPER_HOME/bin
16. . /etc/profile