<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-77  評論-5  文章-2  trackbacks-0

    zookeeper集群安裝

    測試環境redhat5.5:
    vmware建兩臺虛擬機(btw,似乎雙核系統只能建倆,3個就死掉了)
    192.168.229.129
    192.168.229.130


    下載2011年12月15日的最新zookeeper
    加壓到
    /opt/zookeeper-3.4.0/
    配置/opt/zookeeper-3.4.0/conf/zoo.cfg
    可以把那個例子考過來
    Java代碼 復制代碼 收藏代碼
    1. # The number of milliseconds of each tick   
    2. tickTime=2000  
    3. # The number of ticks that the initial    
    4. # synchronization phase can take   
    5. initLimit=10  
    6. # The number of ticks that can pass between    
    7. # sending a request and getting an acknowledgement   
    8. syncLimit=5  
    9. # the directory where the snapshot is stored.   
    10. do not use /tmp for storage, /tmp here is just    
    11. # example sakes.   
    12. dataDir=/opt/zookeeper-3.4.0/data/zookeeper   
    13. dataLogDir=/opt/zookeeper-3.4.0/data/log   
    14. # the port at which the clients will connect   
    15. clientPort=2181  
    16. #   
    17. # Be sure to read the maintenance section of the    
    18. # administrator guide before turning on autopurge.   
    19. #   
    20. # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance   
    21. #   
    22. # The number of snapshots to retain in dataDir   
    23. #autopurge.snapRetainCount=3  
    24. # Purge task interval in hours   
    25. # Set to "0" to disable auto purge feature   
    26. #autopurge.purgeInterval=1  
    27. server.1=192.168.229.129:2888:3888  
    28. server.2=192.168.229.130:2888:3888  

    修改/opt/zookeeper-3.4.0/bin/zkServer.sh
    Java代碼 復制代碼 收藏代碼
    1. status)   
    2.     # -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output   
    3.     #STAT=`echo stat | nc -q 1 localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//'2> /dev/null| grep Mode`   
    4.     STAT=`echo stat | nc localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//'2> /dev/null| grep Mode`  

    以上這些多臺機器一樣

    log和data都在dataDir下面
    如果找不到log了用大招:
    ps -ef|grep zookeeper
    ls -l /proc/123123/fd
    其中有一個是log
    然后dataDir建立一個文件myid
    在192.168.229.129上
    echo 1 >/opt/zookeeper-3.4.0/data/zookeeper/myid
    在192.168.229.130上
    echo 2 >/opt/zookeeper-3.4.0/data/zookeeper/myid
    對應zoo.cfg里面的
    注意一定是數字


    然后zkServer.sh start 
    啟動
    zkServer.sh status
    看狀態
    echo ruok|nc localhost 2181         
    //are you ok?
    echo dump|nc localhost 2181
    echo stat|nc localhost 2181
    echo srst|nc localhost 2181
    zkServer.sh stop
    posted on 2011-12-16 03:48 huohuo 閱讀(1335) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 337P日本欧洲亚洲大胆艺术图 | 国产在线a免费观看| 91在线老王精品免费播放| 精品免费人成视频app | 国产一区视频在线免费观看| 亚洲 另类 无码 在线| 超清首页国产亚洲丝袜| 亚洲综合亚洲国产尤物| 亚洲成av人无码亚洲成av人| 一本一道dvd在线观看免费视频 | 国产99在线|亚洲| 一级黄色免费大片| 亚洲精品国产高清嫩草影院| 亚洲国产成人精品无码一区二区| 成年网站免费入口在线观看| 国产免费不卡视频| 国产V亚洲V天堂无码| 亚洲一区二区三区高清不卡| 日韩高清免费观看| 亚洲精品自在线拍| 久久精品女人天堂AV免费观看| 亚洲一区二区三区AV无码| 亚洲高清一区二区三区电影| 免费a级黄色毛片| 亚洲综合av一区二区三区| 久久精品无码精品免费专区| 国产成人免费手机在线观看视频 | 一本久久免费视频| 亚洲AV无码一区二区二三区软件| 鲁死你资源站亚洲av| 在线免费观看一级毛片| 亚洲视频中文字幕在线| 在线免费播放一级毛片| 一级毛片直播亚洲| 久久久久久国产精品免费免费男同 | 可以免费观看一级毛片黄a | 亚洲黄色在线视频| 国产小视频在线观看免费| 国内永久免费crm系统z在线| 中文字幕亚洲天堂| 国产高清不卡免费在线|