一.下载zookeeper压缩包
二.上传解压安装包到/data/zookeeper目录,并解压
tar -zxvf apache-zookeeper-3.5.8-bin.tar.gz
三.修改配置文件
cd apache-zookeeper-3.5.10-bin/conf
mv zoo_sample.cfg zoo.cfg vi zoo.cfg
修改为如下:
dataDir=/data/zookeeper/apache-zookeeper-3.5.10-bin/data
四.配置环境变量
export ZOOKEEPER_HOME=/data/soft/apache-zookeeper-3.5.8-bin
export PATH=$ZOOKEEPER_HOME/bin:$PATH
五.启动zookeeper服务
zkServer.sh start
六.验证 jps-m
如果能看到QuorumPeerMain进程就说明zookeeper启动成功