下载:wget https://www-us.apache.org/dist/zookeeper/zookeeper-3.4.13/zookeeper-3.4.13.tar.gz
解压:tar -zxvf zookeeper-3.4.13.tar.gz
进入目录:cd zookeeper-3.4.13/conf
复制默认配置文件并改名:cp zoo_sample.cfg /usr/local/zookeeper/zookeeper-3.4.13/conf/zoo.cfg
进入bin目录启动zookeeper:./zkServer.sh start
zookeeper默认端口为2181,查看2181端口是否有java进程使用:netstat -apn | grep 2181(如果有则启动成功。否则失败)
启动,停止,重启,状态:
bin目录下执行:
./zkServer.sh start
./zkServer.sh stop
./zkServer.sh restart
./zkServer.sh status