title: How to run infinitely script in background on Linux?
body: <p>I have a PHP script with infinite loop. I need this script running forever. So, I run </p>
  
  <pre><code>php /path/to/script.php &gt; /dev/null &amp;
  </code></pre>
  
  <p>And it works in background in my current user's security context. But when I close terminal window (log off), of course, CentOS Linux kills my program. </p>
  
  <p>I see two guesses: run from a different user in background or make a daemon. I need help in each situation. </p>
  
  <p>Thanks a lot!</p>