远程启动HADOOP+YARN集群Shell脚本-创新互联
1、创建脚本
vi start-hadoop.sh
- #!/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
当前名称:远程启动HADOOP+YARN集群Shell脚本-创新互联
文章URL:http://scgulin.cn/article/dssoco.html