我们都知道,使用ssh在另一台机子执行一个ssh文件的语句是酱紫的

ssh root@1.9.7.56  "chmod 777 /opt/script/tomcatStop.sh ; sh /opt/script/tomcatStop.sh"

好的,然后就出问题咯。。。。找不到环境变量

于是乎找原因,发现是被控制的tomcat没有配置到环境变量。

那么的话,就给tomcat配置上环境变量好了

进入tomcat的bin目录下

vi setclasspath.sh

然后把环境变量配置过去即可

 vi /opt/apache-tomcat-8.5.33/bin/setclasspath.sh

 

 posted on 2018-12-25 09:26  WU大雄  阅读(231)  评论(1编辑  收藏  举报