在/usr/local/bin 目录下
#!/bin/bash
user=`whoami`
echo -e "================ 正在启动Zookeeper ===========\n"
for((host=102; host<=104; host++)); do
echo -e "\n---$user@hadoop$host---"
ssh $user@hadoop$host '/opt/module/zookeeper-3.4.10/bin/zkServer.sh start'
done