美文网首页
Zookeeper集群管理工具exhibitor安装

Zookeeper集群管理工具exhibitor安装

作者: Lesus | 来源:发表于2016-12-20 21:12 被阅读0次

    [exhibitor] installation

    0. precondition

    mkdir -p /var/lib/zookeeper /opt/snapshot_dir  /var/log/exhibitor/

    ln -s /opt/jdk1.7.0_79/bin/jps /usr/bin/jps

    1. startup all zookeepers

    ZK_HOME=/opt/zookeeper-3.4.9

    cp -f zoo.cfg $ZK_HOME/conf/zoo.cfg

    cp -f myid /var/lib/zookeeper/myid

    $ZK_HOME/bin/zkServer.sh start

    netstat -lpn | grep 2181  # sanity check

    2. startup all exhibitors  The web ui of exhibitor will stay inactive even after this step, and more setting will be make in the next step.

    EXHIBITOR_JAR=/opt/exhibitor/exhibitor-1.5.6-all.jar(This jar can be built by yourself or be downloaded on the internet.)

    SHARED_FOLDER=/mnt/hgfs/zk (This folder was set using vmware tools)

    java -jar $EXHIBITOR_JAR -c file --fsconfigdir $SHARED_FOLDER --filesystembackup true --servo true

    netstat -lpn | grep 8080  # sanity check

    3. configurate web ui of exhibitor

    .1 execute on all nodes

    cat <<EOF >> /etc/hosts

    192.168.1.71    zk1

    192.168.1.72    zk2

    192.168.1.73    zk3

    EOF

    # you may manually ping each other to check connectivity.

    . on any one but only one of exhibitor webs, like http://zk1.cc:8080/

    Install Dir=/opt/zookeeper-3.4.9

    Snapshot Dir=/opt/snapshot_dir

    Servers=S:1:zk1,S:2:zk2,S:3:zk3  # you must use hostname rather than ip or domain name, or you may fail

    click Commit button

    # if all servers lights turned green after a while, then exhibitor setting succeeded finally.

    +

    . run in background and redirect all log to file /var/log/exhibitor/exhi.log

    nohup java -jar  /opt/exhibitor/exhibitor.jar -c file --fsconfigdir /mnt/hgfs/zk --filesystembackup true --servo true >

    /var/log/exhibitor/exhi.log 2>&1 &

    Environment:

    Debian8.6 x64(vmware)  I used three servers in this installation.

    JDK1.7.0_79 x64

    zookeeper-3.4.9

    exhibitor-1.5.6-all.jar

    相关文章

      网友评论

          本文标题:Zookeeper集群管理工具exhibitor安装

          本文链接:https://www.haomeiwen.com/subject/riefvttx.html