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