Linux服务器启动脚步辅助命令

it2022-05-05  229

# 辅助脚本: #!/bin/bash echo "================ 开始停止所有节点服务 ===========" echo "================ 正在停止Zookeeper ===========" for i in root@CentOSA root@CentOSB root@Hadoop do ssh $i '/opt/modules/zookeeper-3.4.5/bin/zkServer.sh stop' done echo "================ 正在停止HDFS ===========" ssh root@Hadoop '/opt/modules/hadoop-2.7.2/sbin/stop-dfs.sh' echo "================ 正在停止YARN ===========" ssh root@CentOSA '/opt/modules/hadoop-2.7.2/sbin/stop-yarn.sh' ssh root@CentOSB '/opt/modules/hadoop-2.7.2/sbin/yarn-daemon.sh stop resourcemanager' echo "================ linux01节点正在停止JobHistoryServer ===========" ssh root@Hadoop '/opt/modules/hadoop-2.7.2/sbin/mr-jobhistory-daemon.sh stop historyserver'

 


最新回复(0)