- 下载(下载-bin)
-
tar -zxvf apache-zookeeper-3.5.6-bin.tar.gz 解压
-
新建data和logs文件
mkdir data
mkdir logs
-
/conf/cp zoo_sample.cfg zoo.cfg
修改配置文件dataDir=/usr/meilang/apache-zookeeper-3.5.6/data
dataLogDir=/usr/local/apache-zookeeper-3.5.6/logs配置环境变量
/etc/profile
export ZOOKEEPER_HOME=/usr/meilang/apache-zookeeper-3.5.6
export PATH=$PATH:$ZOOKEEPER_HOME/bin:$ZOOKEEPER_HOME/conf -
命令
切换到bin目录:
./zkServer.sh start
./zkServer.sh stop
./zkServer.sh status
客户端连接
zkCli.sh -server 127.0.0.1:2181