zoukankan      html  css  js  c++  java
  • Zookeeper环境搭建(Windows)

    下载

    官网
    下载最新的版本,我下载的是3.6.1的版本。
    下载下来的文件是apache-zookeeper-3.6.1-bin.tar.gz
    解压出来是这样的包括文件夹:
    bin
    conf
    docs
    lib
    文件:
    LICENSE
    NOTICE
    README.md
    README_packaging.md

    更改配置文件

    配置文件在conf/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=D:Toolsapache-zookeeper-3.6.1-bi\data
    dataLogDir=D:Toolsapache-zookeeper-3.6.1-binlog
    # 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
    
    ## Metrics Providers
    #
    # https://prometheus.io Metrics Exporter
    #metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
    #metricsProvider.httpPort=7000
    #metricsProvider.exportJvmInfo=true
    admin.serverPort=8888
    

    指定了data路径和log路径
    注意最后一行是更改端口号的,AdminServer的默认端口号是8080,如果不想用8080端口就可以指定别的端口,我这里指定的是8888.

    双击bin/zkServer.cmd

    操作参考链接

    Zookeeper还有一套UI可视化界面(ZKUI

  • 相关阅读:
    旧键盘 (20)
    人口普查(20)
    打印沙漏(20)
    程序运行时间(15)
    反转链表 (25)
    科学计数法 (20)
    组个最小数 (20)
    python yield使用
    python如何优雅判断类型
    python中如何优雅使用import
  • 原文地址:https://www.cnblogs.com/LoganChen/p/13594394.html
Copyright © 2011-2022 走看看