继续EC2实例运行的服务器的SSH终止后实例、继续、服务器、SSH

2023-09-11 09:01:07 作者:森旅迷了鹿

目前,我有一个 EC2 实例中运行的两个服务器(的MongoDB bottlepy )。一切正常,当我SSHed的实例和启动这两个服务器。然而,当我关闭了SSH会话(实例仍在运行),我失去了这两个服务器。有没有办法让退出后的服务器上运行?我使用 Bitvise Tunnelier 在Windows 7上。 我使用的实例是Ubuntu的服务器12.04.3 LTS。

Currently, I have two servers running on an EC2 instance (MongoDB and bottlepy). Everything works when I SSHed to the instance and started those two servers. However, when I closed the SSH session (the instance is still running), I lost those two servers. Is there a way to keep the server running after logging out? I am using Bitvise Tunnelier on Windows 7. The instance I am using is Ubuntu Server 12.04.3 LTS.

推荐答案

如果您不希望运行某些程序作为服务(或通过Apache模块),你可以(像我这样做,使用IRC)使用 GNOME屏幕 。

If you don't want to run some process as a service (or via an apache module) you can (like I do for using IRC) use .

屏幕让您的服务器上运行,即使你关闭连接 - 因此每次内启动进程将继续运行过

screen keeps running on your server even if you close the connection - and thus every process you started within will keep running too.