Zookeeper安装(standalone模式)

环境

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

准备

  • jdk安装
    参见:http://www.jianshu.com/p/9d1b3eefdea3

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

你可能感兴趣的:(Zookeeper安装(standalone模式))