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
    

      

  • 相关阅读:
    手写堆排序和归并排序
    海量数据处理
    HDU 1532 --&&-- POJ1273 dinic 算法
    POJ 3159 最短路 SPFA
    POJ 1459 网络流 EK算法
    8.14比赛j题 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87813#overview
    单链表---邻接表
    poj 1273 ---&&--- hdu 1532 最大流模板
    HDU 2603 二分匹配
    UVA 796 连通图求桥
  • 原文地址:https://www.cnblogs.com/zenan/p/10133557.html
Copyright © 2011-2022 走看看