继续EC2实例运行的服务器的SSH终止后 [英] keep server running on EC2 instance after ssh is terminated

查看:165
本文介绍了继续EC2实例运行的服务器的SSH终止后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有一个 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)使用<一个HREF =htt​​ps://apps.ubuntu.com/cat/applications/screen相对=nofollow> 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.

这篇关于继续EC2实例运行的服务器的SSH终止后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆