zoukankan      html  css  js  c++  java
  • zookeeper部署

    版本:zookeeper-3.4.5-cdh5.10.0.tar.gz

    网址:http://archive-primary.cloudera.com/cdh5/cdh/5/

    1. 解压

    $ tar -zxf zookeeper-3.4.5-cdh5.10.0.tar.gz -C /usr/local
    $ mv zookeeper-3.4.5-cdh5.10.0 ./zookeeper
    

      

    2. 配置文件

    $ vim /usr/local/zookeeper/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=/usr/local/zookeeper/data
    # the port at which the clients will connect
    clientPort=2181
    #
    # 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
    
    server.1=master:2888:3888
    server.2=data1:2888:3888
    server.3=data2:2888:3888
    server.4=data3:2888:3888
    

      

    3. 在zookeeper/下

    $ mkdir data
    $ vim data/myid
    1
    

      

    4. scp 至另外三台

    $ scp /usr/local/zookeeper data1:/usr/local/zookeeper
    $ scp /usr/local/zookeeper data2:/usr/local/zookeeper
    $ scp /usr/local/zookeeper data3:/usr/local/zookeeper
    
    修改myid 编号1-4
    

      

    5. 启动zookeeper

    # master
    $ /usr/local/zookeeper/bin/zkServer.sh start
    # data1,data2,data3
    $ /usr/local/zookeeper/bin/zkServer.sh start
    

      

    6. jps

    1282 QuorumPeerMain
    1363 Jps
    

      

  • 相关阅读:
    C# SqlTransaction事务,先从后主
    去除HTML标记
    GIT拉取问题
    QQ音乐API
    解决UEditor编辑器禁用时点击文本编辑器会多加一个字符问题
    UEditor编辑器增加placeholder提示
    C# List去重及优化建议
    ref和out解析
    时间标准格式转换及数值的ToString的格式化
    没有被“怼”,顺利通过华为Android三面,看看面试官都问了我什么?
  • 原文地址:https://www.cnblogs.com/zenan/p/10133557.html
Copyright © 2011-2022 走看看