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