zoukankan      html  css  js  c++  java
  • ZooKeeper 安装与部署

    一、下载

    下载地址:http://mirror.bit.edu.cn/apache/zookeeper/stable/apache-zookeeper-3.5.5-bin.tar.gz

    二、安装

    直接解压到期望文件夹。

    三、配置

    在解压后的文件夹中添加两个目录,data和logs,用于存储数据与日志。

    文件夹conf中,存放配置文件,现有一个名为zoo_sample.cfg的文件,这是示例配置文件。

    新建配置文件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=E:\environment\zookeeper\apache-zookeeper-3.5.5\data
    dataLogDir=E:\environment\zookeeper\apache-zookeeper-3.5.5\logs
    # the port at which the clients will connect
    clientPort=2181

    四、启动

    打开命令提示符,进入bin目录,输入zkServer启动。

    E:environmentzookeeperapache-zookeeper-3.5.5in>zkServer
    
    E:environmentzookeeperapache-zookeeper-3.5.5in>call "C:Program FilesJavajdk1.8.0_181"injava "-Dzookeeper.log.dir=E:environmentzookeeperapache-zookeeper-3.5.5in..logs" "-Dzookeeper.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-Kuningasic-server-DESKTOP-KJCEOIF.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f" -cp "E:environmentzookeeperapache-zookeeper-3.5.5in..uildclasses;E:environmentzookeeperapache-zookeeper-3.5.5in..uildlib*;E:environmentzookeeperapache-zookeeper-3.5.5in..*;E:environmentzookeeperapache-zookeeper-3.5.5in..lib*;E:environmentzookeeperapache-zookeeper-3.5.5in..conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "E:environmentzookeeperapache-zookeeper-3.5.5in..confzoo.cfg"
    2019-06-12 20:56:27,191 [myid:] - INFO  [main:QuorumPeerConfig@133] - Reading configuration from: E:environmentzookeeperapache-zookeeper-3.5.5in..confzoo.cfg
    2019-06-12 20:56:27,201 [myid:] - INFO  [main:QuorumPeerConfig@385] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
    2019-06-12 20:56:27,201 [myid:] - INFO  [main:QuorumPeerConfig@389] - secureClientPort is not set
    2019-06-12 20:56:27,204 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
    2019-06-12 20:56:27,206 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
    2019-06-12 20:56:27,206 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
    2019-06-12 20:56:27,206 [myid:] - WARN  [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running  in standalone mode
    2019-06-12 20:56:27,208 [myid:] - INFO  [main:ManagedUtil@46] - Log4j found with jmx enabled.
    2019-06-12 20:56:27,286 [myid:] - INFO  [main:QuorumPeerConfig@133] - Reading configuration from: E:environmentzookeeperapache-zookeeper-3.5.5in..confzoo.cfg
    2019-06-12 20:56:27,286 [myid:] - INFO  [main:QuorumPeerConfig@385] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
    2019-06-12 20:56:27,287 [myid:] - INFO  [main:QuorumPeerConfig@389] - secureClientPort is not set
    2019-06-12 20:56:27,287 [myid:] - INFO  [main:ZooKeeperServerMain@117] - Starting server
    
  • 相关阅读:
    SpringMVC引入CSS等文件
    idea运行时默认显示的index.jsp修改方法
    Spring 中的 JDBCTemplate
    Spring 错误 cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'.
    Spring IOC 三种注入方式(构造器,setter,接口)
    Java中的Object、T(泛型)、?区别
    DBUtils 笔记
    DBCP + C3P0 连接池
    Servlet+JSP 对外访问路径配置
    linux iptables使用
  • 原文地址:https://www.cnblogs.com/Currention/p/11012702.html
Copyright © 2011-2022 走看看