zoukankan      html  css  js  c++  java
  • zookeeper集群

    3台centos虚拟机

    vi /etc/hosts

    node1 ip1

    node2 ip2

    node3 ip3

    wget http://apache.fayea.com/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz

    tar -zxvf zookeeper-3.4.9.tar.gz 

    cd zookeeper-3.4.9/conf/
    cp zoo_sample.cfg zoo.cfg


    vi zoo.cfg

    dataDir=/root/zookeeper-3.4.9/tmp

    server.1=node1:2888:3888

    server.2=node2:2888:3888

    server.3=node3:2888:3888

    mkdir /root/zookeeper-3.4.9/tmp
    echo 1 > /root/zookeeper-3.4.9/tmp/myid

    scp -r /root/zookeeper-3.4.9/ node2:/root
    scp -r /root/zookeeper-3.4.9/ node3:/root

    node2:

    echo 2 > /root/zookeeper-3.4.9/tmp/myid

    node3:

    echo 3 > /root/zookeeper-3.4.9/tmp/myid

    cd /root/zookeeper-3.4.9/bin/
    ./zkServer.sh start

    ./zkServer.sh status

  • 相关阅读:
    树:二叉树
    树:红黑树
    gtest
    VDB R&D
    QML 从入门到放弃
    json parse
    Effective C++ 笔记
    Samples topic
    C++ 11 snippets , 2
    C++ 11 snippets , 1
  • 原文地址:https://www.cnblogs.com/GodZhe/p/11193489.html
Copyright © 2011-2022 走看看