美文网首页
zookeeper集群启动脚本

zookeeper集群启动脚本

作者: 扣篮的左手 | 来源:发表于2018-08-31 16:31 被阅读0次

start_zk.sh

#!/bin/sh
for host in node-1 node-2 node-3
do
  ssh $host "source /etc/profile;zkServer.sh start"
  echo "$host zk is running"
done

stop_zk.sh

#!/bin/sh
for host in node-1 node-2 node-3
do
  ssh $host "source /etc/profile;zkServer.sh stop"
  echo "$host zk is stopping"
done

status_zk.sh

#!/bin/sh
for host in node-1 node-2 node-3
do
  ssh $host "source /etc/profile;zkServer.sh status"
  echo "$host zk's status"
done

相关文章

网友评论

      本文标题:zookeeper集群启动脚本

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