#!/bin/bash case in "start"){ # 部署的机器名称 for i in zhaohui01 zhaohui02 zhaohui03 do echo --------- zookeeper $i 启动----------- # zookeeper的bin目录 ssh $i "/opt/zookeeper-3.5.7/bin/zkServer.sh start" done echo --------- zookeeper启动完成----------- } ;; "stop"){ for i in zhaohui01 zhaohui02 zhaohui03 do echo --------- zookeeper $i 停止----------- ssh $i "/opt/zookeeper-3.5.7/bin/zkServer.sh stop" done echo --------- zookeeper停止完成----------- } ;; "status"){ for i in zhaohui01 zhaohui02 zhaohui03 do echo --------- zookeeper $i 状态----------- ssh $i "/opt/zookeeper-3.5.7/bin/zkServer.sh status" done } ;; esac
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)