Zookeeper安装(standalone模式)

环境

系统:CentOS 6.8
软件:zookeeper-3.4.6.tar.gz

准备

zookeeper安装

  • 下载二进制包
    地址:http://www.apache.org/dyn/closer.cgi/zookeeper/

  • 安装

    # tar -xzvf zookeeper-3.4.6.tar.gz
    # mv zookeeper-3.4.6 /usr/local/zookeeper
    
  • 配置环境变量

    # vim /etc/profile
    export PATH=/usr/local/zookeeper:$PATH
    
    # source /etc/profile
    

zookeeper配置

  • 创建数据目录

    # mkdir -p /data/zookeeper
    
  • 配置

    # cp /usr/local/zookeeper/conf/zoo_sample.cfg /usr/local/zookeeper/conf/zoo.cfg
    
    # vim /usr/local/zookeeper/conf/zoo.cfg
    dataDir=/data/zookeeper
    

zookeeper启动

# cd /usr/local/zookeeper && ./bin/zkServer.sh start
    原文作者:袁先生的教程
    原文地址: https://www.jianshu.com/p/ca110efb69ba
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞