单节点 zookeeper 安装 发表于 2016-08-31 | 评论数: | 阅读次数: 安装过程12345678910111213141516# 下载cd /optwget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.8/zookeeper-3.4.8.tar.gztar -axvf zookeeper-3.4.8.tar.gzcd zookeeper-3.4.8# 环境变量cat >> ~/.bashrc <<EOF########## ZOOKEEPER ####################export ZOOKEEPER_HOME=/opt/zookeeper-3.4.8export PATH=\$PATH:\$ZOOKEEPER_HOME/binexport CLASSPATH=\$CLASSPATH:\$ZOOKEEPER_HOME/lib/*EOF# 使环境变量生效source ~/.bashrc 1234# 配置cp $ZOOKEEPER_HOME/conf/zoo_sample.cfg $ZOOKEEPER_HOME/conf/zoo.cfg# 修改zoo.cfg的datadir配置为dataDir=/data/var/lib/zookeeper 启动1234# 启动$ZOOKEEPER_HOME/bin/zkServer.sh start# 关闭$ZOOKEEPER_HOME/bin/zkServer.sh stop 参考文档 https://zookeeper.apache.org/doc/r3.4.8/ https://zookeeper.apache.org/doc/r3.4.8/zookeeperStarted.html