Home  >  Article  >  Backend Development  >  linux怎么自动运行webservice

linux怎么自动运行webservice

WBOY
WBOYOriginal
2016-06-13 11:10:43870browse

linux如何自动运行webservice
我用php做了一个service服务,现在要通过ssh来启动那服务,启动的命如下php /www/aabb/websocket/websocket/server/server.php,现在有二个问题随之而来
1、如果通过ssh来启动service服务的话,那运行SSH的那台WINDOWS电脑如果长时间不操作的话,SSH会不会自动关闭,关闭之后service还会启来吗,如果启不来那服务,有很多事情做不了
2、是否能将那个service服务写进nginx中,就是做到只要服务器开着,那个service服务也运行起来了
请各位帮帮我,我是第一次写webservice程序,昨天想了一下,没有想到解决方案


------解决方案--------------------
nohup php /www/aabb/websocket/websocket/server/server.php &
后台执行
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn