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
    

     

  • 相关阅读:
    安卓手机!用swiper做轮播效果,两张图片之间会有一个像素的空白
    手机端swiper快速滑动会有白屏
    axios请求下载excel文件
    人人都能学会的webpack5搭建vue3项目(二)配置Vue
    人人都能学会的webpack5搭建vue3.0项目,可应用于生产环境 (一)
    mybatis 生成 mapper文件
    超强工具类系列
    mybatis 自动生成mapper文件
    面试
    linux安装mysql8.0.25
  • 原文地址:https://www.cnblogs.com/royfans/p/7230213.html
Copyright © 2011-2022 走看看