1. 下载安装包
cd /usr/software/
rz
2. mkdir -p /usr/local/zookeeper
cp zookeeper-3.4.10.tar.gz /usr/local/zookeeper/zookeeper-3.4.10.tar.gz
3. 解压
cd /usr/local/zookeeper
tar -zxvf zookeeper-3.4.10.tar.gz
cd zookeeper-3.4.10/
4. 配置
mkdir data
mkdir log
pwd
cd conf/
cp zoo_sample.cfg zoo.cfg
vi zoo.cfg
dataDir=/usr/local/zookeeper/zookeeper-3.4.10/data
dataLogDir=/usr/local/zookeeper/zookeeper-3.4.10/log
5. 测试
cd bin
启动
./zkServer.sh start
查看QuorumPeerMain进程
jps
查看状态
./zkServer.sh status
停止
./zkServer.sh stop
连接
./zkCli.sh -server localhost:2181
ls /
quit退出