java语言开发 需要jdk
node02:
  tar xf zook....tar.gz
  mv zoo... /opt/bigdata
  cd /opt/bigdata/zoo....
  cd conf
  cp zoo_sample.cfg zoo.cfg
  vi zoo.cfg
    datadir=/var/bigdata/hadoop/zk
    server.1=node02:2888:3888
    server.2=node03:2888:3888
    server.3=node04:2888:3888
  mkdir /var/bigdata/hadoop/zk
  echo 1 > /var/bigdata/hadoop/zk/myid
  vi /etc/profile
    export ZOOKEEPER_HOME=/opt/bigdata/zookeeper-3.4.6
    export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$ZOOKEEPER_HOME/bin
.   /etc/profile
  cd /opt/bigdata
  scp -r ./zookeeper-3.4.6 node03:`pwd`
  scp -r ./zookeeper-3.4.6 node04:`pwd`
node03:
  mkdir /var/bigdata/hadoop/zk
  echo 2 > /var/bigdata/hadoop/zk/myid
  配置环境变量
  . /etc/profile
node04:
  mkdir /var/bigdata/hadoop/zk
  echo 3 > /var/bigdata/hadoop/zk/myid
  配置环境变量
  . /etc/profile

启动ZK
node02~node04:
  zkServer.sh start