linux安装zookeeper

 

1.下载jdk1.8 Linux版(需要java环境);

2.下载zookeeper-3.4.13.tar.gz

 

1.创建需要放置的文件夹:mkdir /usr/local/java  mkdir /usr/local/zookeeper

2.解压tar -xzvf 俩个文件

3.配置环境变量(java和zookeeper)修改/etc/profile文件

  export JAVA_HOME=/usr/local/jdk1.8.0_131
  export PATH=$JAVA_HOME/bin:$PATH
  export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tool.jar

  export ZOOKEEPER_INSTALL=/usr/local/zookeeper-3.4.13/
  export PATH=$PATH:$ZOOKEEPER_INSTALL/bin

(配置生效)保存文件后:输入命令配置:source /etc/profile

4.zookeeper需要一个额外配置;

  ①到zookeeper的conf目录复制文件zoo_sample.cfg新文件名zoo.cfg

  ②修改zoo.cfg内容dataDir=/tmp/zookeeper/data

5.验证

检查JDK:  java -version

启动zookeeper:  ./zkServer.sh start

 

jdk参考来源: blog.csdn.net/xlecho/article/details/97266591

zk参考来源: cnblogs.com/expiator/p/9853378.html

posted @ 2020-05-12 14:25  老年痴呆  阅读(257)  评论(0编辑  收藏  举报