tar -zxvf apache-zookeeper-3.7.3.tar.gz -C /usr/local
进入zookeeper的安装目录的conf目录
cd /usr/local/zookeeper/config
cp zoo_sample.cfg zoo.cfg
修改zoo.cfg
# The number of milliseconds of each tick
tickTime=2000initLimit=10
syncLimit=5
dataDir=/usr/local/zookeeper/zkdata
dataLogDir=/usr/local/zookeeper/zklogs
clientPort=2181
mkdir /usr/local/zookeeper/zkdata
mkdir /usr/local/zookeeper/zklogs
vim /etc/profile
export JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
zkServer.sh start
zkServer.sh status