欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Zookeeper部署

程序员文章站 2022-06-19 08:53:38
...

1、下载安装包到software

curl -O http://archive.cloudera.com/cdh5/cdh/5/zookeeper-3.4.5-cdh5.15.1.tar.gz

2、解压到~/application

tar -zxvf zookeeper-3.4.5-cdh5.15.1.tar.gz -C ~/application

3、添加系统环境变量

sudo vim ~/.bash_profile
# Setting Path for ZooKeeper
export ZOOKEEPER_HOME=~/application/zookeeper-3.4.5-cdh5.15.1
export PATH=$PATH:$ZOOKEEPER_HOME/bin
source ~/.bash_profile

4、配置ZooKeeper

cd ~/application/zookeeper-3.4.5-cdh5.15.1/conf

cp zoo_sample.fg zoo.cfg
#修改zoo.cfg
vim zoo.cfg
    dataDir=~/application/tmp/zookeeper

5、启动ZooKeeper

cd ~/application/zookeeper-3.4.5-cdh5.15.1/bin

#启动服务
./zkServer.sh start

#启动客户端
./zkCli.sh