kafka 启停脚本
作者:互联网
新建kf.sh 文件
#!/bin/bash
case $1 in
"start"){
for i in Bigdata04 Bigdata05 Bigdata06
do
echo ---------- kafka $i 启动 ------------
ssh $i "/opt/module/kafka/bin/kafka-server-start.sh -daemon /opt/module/kafka/config/server.properties"
done
};;
"stop"){
for i in Bigdata04 Bigdata05 Bigdata06
do
echo ---------- kafka $i 停止 ------------
ssh $i "/opt/module/kafka/bin/kafka-server-start.sh -daemon /opt/module/kafka/config/server.properties"
done
};;
esac
注意,写脚本之前,一定要修改 :
https://blog.csdn.net/weixin_45417821/article/details/108134213
标签:脚本,opt,module,server,start,启停,bin,kafka 来源: https://blog.csdn.net/weixin_45417821/article/details/120558507