zoukankan      html  css  js  c++  java
  • zookeeper单机版安装

    一、zookeeper单机版安装

    下载zookeeper-3.4.6.tar.gz

    解压在/opt目录下

    在/home/zookeeper-3.4.6目录下创建以下目录:

    mkdir data

    mkdir logs

    将/opt/zookeeper-3.4.6/conf/下的zoo.sample.cfg 文件拷贝一份,命名为zoo.cfg

    cp zoo_sample.cfg zoo.cfg

    修改zoo.cfg的配置文件:

    vi zoo.cfg:

    # The number of milliseconds of each tick
    tickTime=2000
    # The number of ticks that the initial
    # synchronization phase can take
    initLimit=10
    # The number of ticks that can pass between
    # sending a request and getting an acknowledgement
    syncLimit=5
    # the directory where the snapshot is stored.
    # do not use /tmp for storage, /tmp here is just
    # example sakes.
    dataDir=/tmp/zookeeper
    # the port at which the clients will connect
    clientPort=2181
    # the maximum number of client connections.
    # increase this if you need to handle more clients
    #maxClientCnxns=60
    #
    # Be sure to read the maintenance section of the
    # administrator guide before turning on autopurge.
    #
    # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
    #
    # The number of snapshots to retain in dataDir
    #autopurge.snapRetainCount=3
    # Purge task interval in hours
    # Set to "0" to disable auto purge feature
    #autopurge.purgeInterval=1
    
     
    
    其他默认,dataDir修改成刚才新建的data目录,同时新增dataLogDir:
    
    dataDir=/home/zookeeper-3.4.9/data
    
    dataLogDir=/home/zookeeper-3.4.9/logs

    保存,单机版配置已经完成。

    vi /root/.bash_profile 
    
    # zookeeper env
    export ZOOKEEPER_HOME=/home/zookeeper-3.4.9
    export PATH=$ZOOKEEPER_HOME/bin:$PATH
    
     
    
    source /root/.bash_profile 

     启动zk:

    zkServer.sh start

     查看状态:

    zkServer.sh status
    

     

  • 相关阅读:
    php常见的数据类型
    PHP基础语法
    php表单处理
    php操作mongodb基础语法
    php连接MongoDB数据库,对数据库的增删改查
    Linux常见命令
    python操作redis——基本安装和启动
    MySQL简单的存储图片信息
    基本的位运算
    OS七层模型解析
  • 原文地址:https://www.cnblogs.com/royfans/p/7230213.html
Copyright © 2011-2022 走看看