ssh连接远程主机执行脚本的环境变量问题(编写hadoop集群启动脚本)

参考:https://blog.csdn.net/whitehack/article/details/51705889
如:
远程主机执行脚本报错:(因为这种方式是non-interactive + non-login shell,不会去加载/etc/profile系统环境变量,可以配置用户变量.bashrc,把系统环境变量添加到.bashrc中即可)
在这里插入图片描述
分两步去可以实现:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/yhblog/article/details/84839642