zookeeper集群自动启动脚本

定义脚本boot.sh启动zookeeper集群(hadoop1,hadoop2,hadoop3)

1 #!/bin/bash
2 echo "start zkServer..."
3 for i in 1 2 3
4 do
5 ssh hadoop$i "source /etc/profile;/usr/local/zookeeper/bin/zkServer.sh start"
6 done

 

posted @ 2017-04-17 21:56  ahu-lichang  阅读(2193)  评论(0编辑  收藏  举报