zookeeper安装

1.wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.5.5/apache-zookeeper-3.5.5-bin.tar.gz

mkdir /home/hadoop/

tar -zxvf apache-zookeeper-3.5.5-bin.tar.gz

2.配置文件存放在$ZOOKEEPER_HOME/conf/目录下,将zoo_sample.cfd文件名称改为zoo.cfg

dataDir=/home/hadoop/zookeeper/data
dataLogDir=/home/hadoop//zookeeper/logs

admin.serverPort=8080

#2888,3888 are election port
server.1=zookeeper:2888:38888

3.在/etc/profile文件中设置PATH
修改profile文件:
sudo vi /etc/profile

 

export ZOOKEEPER_HOME=/home/hadoop/zookeeper
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH

 4.启动

/bin/zkServer.sh start
5.启动出错,查看日志
./zkServer.sh start-foreground
posted @ 2019-07-04 09:55  快乐就好  阅读(154)  评论(0编辑  收藏  举报