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
    

      

  • 相关阅读:
    中国身份证号码验证
    防止盗链下载问题
    Microsoft .NET Pet Shop 4 架构与技术分析
    常用操作封装类
    ASP.NET 2.0页面框架的几处变化
    普通字符串与HTML相互转换的小经验
    HttpWebRequest实现读取天气预报信息
    事务回滚 c# .net代码
    CAJViewer,AdobeReader等阅读器实现金山词霸屏幕取词功能
    01背包问题动态规划详解
  • 原文地址:https://www.cnblogs.com/zenan/p/10133557.html
Copyright © 2011-2022 走看看