标签:roo tor second man namenode 节点 开启 col ash
echo "=====================正在开启datanode节点========================" for i in root@hadoop101 root@hadoop102 root@hadoop103 do ssh $i ‘/opt/module/hadoop-2.7.2/sbin/hadoop-daemon.sh start datanode‘ done echo "=====================正在开启secondarynamenode节点========================" ssh root@hadoop103 ‘/opt/module/hadoop-2.7.2/sbin/hadoop-daemon.sh start secondarynamenode‘ echo "=====================正在开启ResourceManager节点========================" ssh root@hadoop102 ‘/opt/module/hadoop-2.7.2/sbin/yarn-daemon.sh start resourcemanager‘ echo "=====================正在开启nodeManager节点========================" for i in root@hadoop101 root@hadoop102 root@hadoop103 do ssh $i ‘/opt/module/hadoop-2.7.2/sbin/yarn-daemon.sh start datamanager‘ done echo "=============================正在启动Yarn===============================" ssh root@hadoop101 ‘/opt/module/hadoop-2.7.2/sbin/start-yarn.sh‘ echo "=====================正在开启jobhistoryServer节点========================" ssh root@hadoop101 ‘/opt/module/hadoop-2.7.2/sbin/mr-jobhistory-daemon.sh start historyserver‘ echo "=====================正在启动zookeeper节点========================" for i in root@hadoop101 root@hadoop102 root@hadoop103 do ssh $i ‘/opt/module/zookeeper-3.4.10/bin/zkServer.sh start‘ done done done
群关闭脚本
#!/bin/bash echo "=====================正在关闭集群服务============================" echo "=====================正在关闭zookeeper节点========================" for i in root@hadoop101 root@hadoop102 root@hadoop103 do ssh $i ‘/opt/module/zookeeper-3.4.10/bin/zkServer.sh stop‘ done echo "=====================正在关闭jobhistoryServer节点========================" ssh root@hadoop101 ‘/opt/module/hadoop-2.7.2/sbin/mr-jobhistory-daemon.sh stop historyserver‘ echo "=====================正在关闭ResourceManager节点========================" ssh root@hadoop102 ‘/opt/module/hadoop-2.7.2/sbin/yarn-daemon.sh stop resourcemanager‘ echo "=====================正在关闭nodeManager节点========================" for i in root@hadoop101 root@hadoop102 root@hadoop103 do ssh $i ‘/opt/module/hadoop-2.7.2/sbin/yarn-daemon.sh stop datamanager‘ done echo "=====================正在关闭secondarynamenode节点========================" ssh root@hadoop103 ‘/opt/module/hadoop-2.7.2/sbin/hadoop-daemon.sh stop secondarynamenode‘ echo "=====================正在关闭namenode节点========================" ssh root@hadoop101 ‘/opt/module/hadoop-2.7.2/sbin/hadoop-daemon.sh stop namenode‘ echo "=====================关闭datanode节点========================" for i in root@hadoop101 root@hadoop102 root@hadoop103 do ssh $i ‘/opt/module/hadoop-2.7.2/sbin/hadoop-daemon.sh stop datanode‘ done echo "=====================关闭Yarn节点========================" for i in root@hadoop101 root@hadoop102 root@hadoop103 do ssh $i ‘/opt/module/hadoop-2.7.2/sbin/stop-yarn.sh‘ done
标签:roo tor second man namenode 节点 开启 col ash
原文地址:https://www.cnblogs.com/yaoyu19960106/p/10557632.html