此处)折叠或打开
-
#!/bin/bash
-
-
echo "<-------------hadoop1(192.168.137.132)------------>jps"
-
ssh hadoop001 'cd ~/; source .bash_profile;' cd /app/jdk1.8.0_151/bin \; jps|sort|grep -v Jps
-
-
echo "<-------------hadoop2(192.168.137.133)------------>jps"
-
ssh hadoop002 'cd ~/; source .bash_profile;' cd /app/jdk1.8.0_151/bin \; jps|sort|grep -v Jps
-
-
echo "<-------------hadoop3(192.168.137.134)------------>jps"
-
ssh hadoop003 'cd ~/; source .bash_profile;' cd /app/jdk1.8.0_151/bin \; jps|sort|grep -v Jps
2、脚本赋予权限
chmod 775 queryJSP.sh
3、执行脚本 cd /app
./queryJSP.sh
---完---
【来自@若泽大数据】
本文标题:远程启动HADOOP+YARN集群Shell脚本
浏览路径:
http://wjwzjz.com/article/igocds.html