kafka 集群启动脚本

#!/bin/bash

case $1 in
"start"){

for i in xmaster xslave1 xslave2

do 
    echo "------------$i kafka start----------------"
    ssh $i "source /etc/profile;/home/software/kafka_2.12-2.5.0/bin/kafka-server-start.sh -daemon /home/software/kafka_2.12-2.5.0/config/server.properties"
   
done

};;

"stop"){

for i in xmaster xslave1 xslave2

do 
   echo "------------$i kafka end---------------"
   ssh $i "source /etc/profile;/home/software/kafka_2.12-2.5.0/bin/kafka-server-stop.sh stop"

done
};;
esac
©️2020 CSDN 皮肤主题: 游动-白 设计师:上身试试 返回首页