zookeeper-3.6.1安装(单机版)
注意:需要java环境
mkdir -p /home/tools && cd /home/tools wget http://archive.apache.org/dist/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz tar -zxvf apache-zookeeper-3.6.1-bin.tar.gz
mv apache-zookeeper-3.6.1-bin /home/deploy/zookeeper-3.6.1 mkdir -p /home/deploy/zookeeper-3.6.1/data cd /home/deploy/zookeeper-3.6.1/conf cp zoo_sample.cfg zoo.cfg vim zoo.cfg ##注意:以下为修改后的文件,注意端口不要冲突 tickTime=2000 initLimit=10 syncLimit=5 maxClientCnxns=300 dataDir=/home/deploy/zookeeper-3.6.1/data clientPort=2181 admin.enableServer=false
cd /home/deploy/zookeeper-3.6.1/bin/ ./zkServer.sh start## 如果无法启动,查看启动日志
./zkServer.sh start-foreground#停止
./zkServer.sh stop#重启
./zkServer.sh restart#查看状态
./zkServer.sh status