自动在多个位置部署 Java 应用程序(RMI 服务器)
好吧,就像标题所说,我想在多个位置远程启动相同的 java 程序,比如在云上(例如 EC2 或其他)。就我而言,应用程序是 RMI 服务器,但我想如果我能做到前者,我就可以做到后者。我可能必须在启动之前复制某些文件,甚至类文件。 Capistrano 是最好的选择吗?还是有更多的 Java 语言可以解决此类问题。
谢谢。
Well, like the title says, I want to launch the same java program on multiple locations remotely, say on the cloud (like EC2 or whatever). In my case the apps are the RMI servers but, I guess if I can do the former, I can do the later. I might have to copy certain files, or even the class files before the launch. Is Capistrano the best way to go, or is there something more Java for this sort of a thing.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
注意:我假设当您想要启动时没有任何 JVM 正在运行。
与基于 Unix 的服务器(如 Linux)通信的典型方式是使用 ssh 客户端,它可以轻松地在远程服务器上执行命令。我相信 Windows 也有类似的功能,但我不熟悉它。
您很可能希望由操作系统完成实际管理,以使其更加健壮,因此您只需告诉操作系统上下拉服务即可。对于 Windows,这是通过 SC.EXE 命令。对于 Ubuntu,带有 /etc/init.d/foobar 脚本。
NOTE: I am assuming you do not have any JVM running when you want to start things up.
The typical way to communicate with Unix-based servers (like Linux) is with ssh-clients which can execute commands on a remote server easily. I believe Windows has a similar facility, but I am unfamiliar with it.
You will most likely want the actual management to be done by the operating system to make it more robust, so you just have to tell the OS to pull the service up and down. For Windows that is through the SC.EXE command. For Ubuntu that is with a /etc/init.d/foobar script.