Detailed explanation of steps to add service to php-fpm

php中世界最好的语言
Release: 2023-03-25 22:10:01
Original
2247 people have browsed it

This time I will bring you a detailed explanation of the steps to add service to php-fpm. What are the precautions for adding service to php-fpm? . Here is a practical case. Let’s take a look.

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. Running PHP on the nginx server platform will To make it easier, let’s take a look at an example of php-fpm smoothly starting and configuring services.

My php is source codeinstallation. 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
Copy after login

Set permissions and add services

chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm
Copy after login

You can use the following commands to manage php-fpm in the future

service php-fpm start
service php-fpm stop
service php-fpm restart
service php-fpm reload
Copy after login

I believe you have mastered the method after reading the case in this article, more Please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to make 360 ​​search engines include PHP rewriting method

PHP uses Curl to implement simulated login and capture Detailed explanation of the steps to obtain data

The above is the detailed content of Detailed explanation of steps to add service to php-fpm. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!