This article mainly introduces examples of adding service services to php-fpm. Friends who need it can refer to it
nginx running PHP through FastCGI has obvious advantages over Apache including a PHP environment. Recently, there is news that, PHP5.4 will most likely include the PHP-FPM patch in the kernel, and it will be easier to run PHP on the nginx server platform. Let's take a look at an example of php-fpm smoothly starting and configuring services.
My php is installed from source code. php-fpm versions after PHP 5.3.2 do not support the previous php-fpm (start|restart|stop|reload), then if you configure php-fpm as a service and add smooth start/restart.
Configuration php-fpm.conf (vi /usr/local/php54/etc/php-fpm.conf)
, change pid (;pid = run/php-fpm .pid) remove the ; before
.
Because PHP is compiled and installed, many binary files will be generated in the PHP directory. Find init.d.php-fpm and copy them to init.d.
cp /usr/local/src/php54/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
Set permissions and add services
chmod +x /etc/init.d/php-fpm chkconfig --add php-fpm
You can use the following command to manage in the future php-fpm
service php-fpm start service php-fpm stop service php-fpm restart service php-fpm reload
Summary
The above is what the editor gives you The introduced php-fpm added service service, I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank you all for your support of the php Chinese website!
php-fpm service startup script method php instance
PHP Four Sorting Algorithms Implementation and Efficiency Analysis_php Tips
Summary of Common Methods for PHP to Obtain File Extensions PHP Tips
The above is the detailed content of php-fpm adds service service example php instance. For more information, please follow other related articles on the PHP Chinese website!