1.下载ZooKeeper安装包,下载地址:http://apache.fayea.com/zookeeper/
2.解压安装包
tar -zxvf zookeeper-3.4.10.tar.gz
3.1 拷贝zoo_sample.cfg文件为zoo.cfg
cd zookeeper-3.4.10/conf/
cp zoo_sample.cfg zoo.cfg
vim zoo.cfg修改内容如下:
3.3 创建data目录
cd ../
mkdir data
4.为了方便启动,将ZooKeeper配置到linux环境变量中
vim /etc/profile
export ZOOKEEPER_INSTALL=/usr/local/src/zookeeper-3.4.10 export PATH=$PATH:$ZOOKEEPER_INSTALL/bin
重新加载环境变量
source /etc/profile
5.启动ZooKeeper
zkServer.sh start6.查询ZooKeeper状态
zkServer.sh status原文链接:https://www.f2er.com/centos/376231.html