1.解压
解压安装包并将解压后的目录移动到/usr/local/zookeeper目录下。
tar -zxvf zookeeper-3.4.10.tar.gz
mv zookeeper-3.4.10 /usr/local/zookeeper
cd /usr/local/zookeeper
mkdir logs
mkdir
2.配置
(1).修改配置
cd conf
mv zoo_sample.cfg zoo.cfg
vim
dataDir = /usr/devtools/zookeeper/data
dataLogDir =
(2).设置环境变量
vim /etc/profile
export ZOOKEEPER_HOME=/usr/devtools/zookeeper
export PATH=$PATH:$ZOOKEEPER_HOME/bin
source
3.启动
cd
4.检验
执行status命令,如果出现以下信息,则表示安装成功。
cd
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone