自动在多个位置部署 Java 应用程序(RMI 服务器)

发布于 2024-10-09 18:48:58 字数 176 浏览 0 评论 0原文

好吧,就像标题所说,我想在多个位置远程启动相同的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那一片橙海, 2024-10-16 18:48:58

注意:我假设当您想要启动时没有任何 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文