ssh 终止后保持服务器在 EC2 实例上运行 [英] keep server running on EC2 instance after ssh is terminated

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

问题描述

目前,我有两台服务器在 EC2 实例(MongoDBbottlepy)上运行.当我通过 SSH 连接到实例并启动这两个服务器时,一切正常.但是,当我关闭 SSH 会话(实例仍在运行)时,我丢失了那两台服务器.有没有办法在注销后保持服务器运行?我在 Windows 7 上使用 Bitvise Tunnelier.我使用的实例是 Ubuntu Server 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-screen 安装屏幕 http://hostmar.co/software-small.

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 gnome-screen Install screen http://hostmar.co/software-small.

screen 即使关闭连接也会继续在您的服务器上运行 - 因此您在其中启动的每个进程也将继续运行.

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

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

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