代码改变世界

CentOS安装单机Zookeeper

2018-06-13 14:33  TankDBA  阅读(278)  评论(0编辑  收藏  举报

OS:CentOS release 6.8

Zookeeper:3.4.9

 

# pwd
/usr/local

# wget http://mirrors.cnnic.cn/apache/zookeeper/stable/zookeeper-3.4.9.tar.gz
(http://mirrors.cnnic.cn/apache/zookeeper/stable/)

# tar -zxvf zookeeper-3.4.9.tar.gz

# mv zookeeper-3.4.9/ zookeeper

# cd zookeeper/conf

# cp zoo_sample.cfg zoo.cfg

# mkdir -p /data/zookeeper/logs

# vim zoo.cfg
dataDir=/data/zookeeper
dataLogDir=/data/zookeeper/logs
clientPort=9181


# vim /etc/profile
export ZOOKEEPER_HOME=/usr/local/zookeeper/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH

# source /etc/profile

# zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Mode: standalone

 

参考文档:

    https://www.cnblogs.com/hapday/p/5854907.html

 -The End-

 
Tank
20180613