#! /bin/bash
case $1 in
"start" ){
for i in hadoop102 hadoop103 hadoop104; do
echo "----------- zookeeper $i 启动 -----------"
ssh $i "/opt/module/zookeeper/bin/zkServer.sh start"
done
};;
"stop" ){
for i in hadoop102 hadoop103 hadoop104; do
echo "----------- zookeeper $i 停止 -----------"
ssh $i "/opt/module/zookeeper/bin/zkServer.sh stop"
done
};;
"status" ){
for i in hadoop102 hadoop103 hadoop104; do
echo "----------- zookeeper $i 状态 -----------"
ssh $i "/opt/module/zookeeper/bin/zkServer.sh status"
done
};;
esac
zookeeper集群脚本
猜你喜欢
转载自blog.csdn.net/qq_43523503/article/details/113583930
今日推荐
周排行