#! /bin/bash
case $1 in
"start"){
for i in hadoop102 hadoop103 hadoop104
do
ssh $i "/opt/module/zookeeper-3.4.10/bin/zkServer.sh start"
done
};;
"stop"){
for i in hadoop102 hadoop103 hadoop104
do
ssh $i "/opt/module/zookeeper-3.4.10/bin/zkServer.sh stop"
done
};;
"status"){
for i in hadoop102 hadoop103 hadoop104
do
ssh $i "/opt/module/zookeeper-3.4.10/bin/zkServer.sh status"
done
};;
esac
集群所有进程查看脚本
vim xcall.sh
#! /bin/bash
for i in hadoop102 hadoop103 hadoop104
do
echo --------- $i ----------
ssh $i "$*"
done
chmod 777 xcall.sh
xcall.sh jps
Flume启动停止脚本
#! /bin/bash
case $1 in
"start"){
for i in hadoop102 hadoop103
do
#! /bin/bashcase $1 in"start"){ for i in hadoop102 hadoop103 hadoop104 do ssh $i "/opt/module/zookeeper-3.4.10/bin/zkServer.sh start" done};;"stop"){ for i in hadoop102 hadoop103 hadoop104...