zookeeper启动脚本(start-zk.sh)
============================================================================
#!/bin/bash
for host in master.hadoop slave1.hadoop slave2.hadoop
do
echo "start $host zkServer.sh starting..."
ssh $host "source /etc/profile;/apps/zookeeper-3.4.10/bin/zkServer.sh start"
done
#!/bin/bash
for host in master.hadoop slave1.hadoop slave2.hadoop
do
ssh $host "source /etc/profile;/apps/zookeeper-3.4.10/bin/zkServer.sh status"
============================================================================
#!/bin/bash
for host in master.hadoop slave1.hadoop slave2.hadoop
do
echo "start $host zkServer.sh starting..."
ssh $host "source /etc/profile;/apps/zookeeper-3.4.10/bin/zkServer.sh start"
done
#!/bin/bash
for host in master.hadoop slave1.hadoop slave2.hadoop
do
ssh $host "source /etc/profile;/apps/zookeeper-3.4.10/bin/zkServer.sh status"
done
zookeeper关闭脚本(stop-zk.sh)
============================================================================
#!/bin/bash
for host in master.hadoop slave1.hadoop slave2.hadoop
do
echo "start $host zkServer.sh starting..."
ssh $host "source /etc/profile;/apps/zookeeper-3.4.10/bin/zkServer.sh stop"
done