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

linux怎么自动运行webservice

WBOY
Release: 2016-06-13 12:56:53
Original
1041 people have browsed it

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 &
后台执行
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template