本文主要是介绍linux下安装配置zookeeper,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.下载zookeeper
download zookeeper from www
2.安装Jre环境
export ZOOKEEPER_INSTALL=/software/zookeeper/zookeeper-3.4.9
export PATH=$PATH:$ZOOKEEPER_INSTALL/bin
export JRE_HOME=your java path
3.配置启动
cd /software/zookeeper/zookeeper-3.4.9/
cp zoo_simple.cfg zoo.cfg, 默认识别zoo.cfg为配置文件
vim zoo.cfg
(
edit:dataDir=/software/zookeeper/zookeeper-3.4.9/data
dataLogDir=/software/zookeeper/zookeeper-3.4.9/logs
)
ok, start up zookeeper
/software/zookeeper/zookeeper-3.4.9/bin/zkServer.sh start
/software/zookeeper/zookeeper-3.4.9/bin/zkServer.sh statusconnect zookeeper use client
/software/zookeeper/zookeeper-3.4.9/bin/zkCli.sh (default connect 127.0.0.1:2181)this is ok
这篇关于linux下安装配置zookeeper的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!