zookeeper安装3.6.2

zookeeper安装

zookeeper是基于jdk的,环境要有jdk

查看是否已安装

[root@192 src]# java -version  
// 已安装
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)  

下载zookeeper

wget https://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz

解压

tar -xzvf apache-zookeeper-3.6.2-bin.tar.gz

进入apache-zookeeper-3.6.2-bin创建data文件

cd apache-zookeeper-3.6.2-bin
mkdir data

进入conf配置目录,复制zoo_sample.cfg 命名zoo.cfg

cp zoo_sample.cfg zoo.cfg

通过vim修改zoo.cfg的dateDri。此路径用于存储zookeeper中数据的内存快照、及事物日志文件
在这里插入图片描述
进入zookeeper的bin目录,启动zookeeper

./zkServer.sh start

关闭

./zkServer.sh stop

查看状态

root 22:02:31 /src/apache-zookeeper-3.6.2-bin/bin
$ ./zkServer.sh status
# 出现下面信息启动成功
/usr/bin/java
ZooKeeper JMX enabled by default
Using config: /src/apache-zookeeper-3.6.2-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone

Love code but not life

你可能感兴趣的:(java,zookeeper,linux,centos)