第2章 ZooKeeper安装与启动

 

第2章 ZooKeeper安装


 

2-1 JDK的安装

需要先在Linux系统下安装JDK1.8

tar -zxvf jdk-8u231-linux-x64.tar.gz

rm -f jdk-8u231-linux-x64.tar.gz

cp -R jdk1.8.0_231 /usr/java 

https://blog.csdn.net/qq_40993412/article/details/102613172

 

2-2 zookeeper下载、安装以及配置环境变量 

tar -zxvf zookeeper-3.4.14.tar.gz

mv zookeeper-3.4.14 zookeeper

mv zookeeper /usr/local/

查看安装目录:

cd /usr/local/

ll

配置环境变量:

vim /etc/profile 

# zookeeper environment
export ZOOKEEPER_HOME=/usr/local/zookeeper
export PATH=$PATH:${ZOOKEEPER_HOME}/bin

 

 2-3 zookeeper文件夹主要目录介绍

 

2-4 zookeeper配置文件介绍,运行zk

 

cp zoo_sample.cfg zoo.cfg

 

vim zoo.cfg

 修改配置文件:

dataDir=/usr/local/zookeeper/dataDir
dataLogDir=/usr/local/zookeeper/dataLogDir

 新建日志输出目录:

 cd /usr/local/zookeeper

mkdir dataDir
mkdir dataLogDir

 

cd /usr/local/zookeeper/bin/

./zkServer.sh

 

====================================================================================

end

posted @ 2020-01-14 12:37  Marlon康  阅读(130)  评论(0编辑  收藏  举报