[英]how to run a jar on different linux systems at the same time
I have a jar and I need a utility which can read a file containing ipaddresses and run this jar on those systems. 我有一个jar,我需要一个实用程序,该实用程序可以读取包含ipaddresses的文件并在那些系统上运行此jar。 How can I do this. 我怎样才能做到这一点。
Or what strategy I should apply for this 或者我应该采用什么策略
The question is missing some key info of what you have, but still you can go like this. 问题是缺少您所拥有的一些关键信息,但是您仍然可以像这样去。
#!/bin/sh while read ipadress do scp <YOURPATHTOJAR>/<YOURJARFILE>.jar <YOURUSER>@$ipadress:~/ ssh -f <YOURUSER>@$ipaddress "java ~/<YOURJARFILE>.jar" done
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.