编写shell脚本
新建文本,命名为start-zookeeper.sh
#!/bin/sh
echo "start zkServer…"
for i in master worker0 worker1
do
ssh $i "/usr/local/zookeeper3.4.8/bin/zkServer.sh start"
done
chmod +x start-zookeeper.sh
./start-zookeeper.sh
时间: 2024-11-15 17:59:14
编写shell脚本
新建文本,命名为start-zookeeper.sh
#!/bin/sh
echo "start zkServer…"
for i in master worker0 worker1
do
ssh $i "/usr/local/zookeeper3.4.8/bin/zkServer.sh start"
done
chmod +x start-zookeeper.sh
./start-zookeeper.sh