Zookeeper部署

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

你可能感兴趣的:(大数据,环境搭建)