Existing A, b two servers, where the B server is running a 8888 port software service, a server now use the command line
PHP a.php executes this script, listens to the B server's 8888 port in real-time, if has the device publishes the message to the B server's service software, a.php will receive, then carries on the processing.
The problem now is that if you shut down the locally connected shell, the script will stop running, and how can you keep a.php in the background on the server?
Reply content:
Existing A, b two servers, where the B server is running a 8888 port software service, a server now use the command line
PHP a.php executes this script, listens to the B server's 8888 port in real-time, if has the device publishes the message to the B server's service software, a.php will receive, then carries on the processing.
The problem now is that if you shut down the locally connected shell, the script will stop running, and how can you keep a.php in the background on the server?
In addition to Nohup, you can also choose Supervisor, screen, etc.
In addition, supervisor should be the most suitable, he can be in addition to monitoring the status of the process will automatically restart when the exception exits!
Nohup PHP a.php &
Http://www.cnblogs.com/kapok/archive/2005/11/23/283108.html
Nohup command