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
一起学习,一起进步
定义脚本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