#! /bin/bashcase $1 in"start"){for i in hadoop110 hadoop111 hadoop112
do
echo ======$i======
ssh $i "source /etc/profile && /opt/module/zookeeper-3.5.7/bin/zkServer.sh start"
done
};;"stop"){for i in hadoop110 hadoop111 hadoop112
do
echo ======$i======
ssh $i "source /etc/profile && /opt/module/zookeeper-3.5.7/bin/zkServer.sh stop"
done
};;"status"){for i in hadoop110 hadoop111 hadoop112
do
echo ======$i======
ssh $i "source /etc/profile && /opt/module/zookeeper-3.5.7/bin/zkServer.sh status"
done
};;
esac
注意集群名称修改
启动传参start
停止传参stop
查看状态传参status
本文转载自: https://blog.csdn.net/big_tank/article/details/129355504
版权归原作者 LG_Booker 所有, 如有侵权,请联系我们删除。
版权归原作者 LG_Booker 所有, 如有侵权,请联系我们删除。