Home >Backend Development >PHP Tutorial >CentOS6.5 adds php-fpm to system services

CentOS6.5 adds php-fpm to system services

小云云
小云云Original
2018-02-27 10:29:411883browse

After the nginx source code is installed, it will not be registered as a system service by default, so you need to manually add the system service script. Compile and install PHP, so 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/php-5.6.33/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

Set permissions

chmod 755 /etc/init.d/php-fpm

Configure php-fpm.conf

vim /usr/local/etc/php-fpm.conf

Remove the ";" in front of pid (;pid = run/php-fpm.pid).

After the nginx source code is installed, it will not be registered as a system service by default, so you need to manually add the system service script.

Compile and install php, so many binary files will be generated in the php directory. Find init.d.php-fpm and copy it to init.d.

cp /usr/local/src/php-5.6.33/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

Set permissions

chmod 755 /etc/init.d/php-fpm

Configure php-fpm.conf

vim /usr/local/etc/php-fpm.conf

Remove the ";" in front of pid (;pid = run/php-fpm.pid).

Related recommendations:

php-fpm open status statistics example code

##Introduction to the configuration of php-fpm under Linux and how to use it

Detailed explanation about php-fpm optimization method

The above is the detailed content of CentOS6.5 adds php-fpm to system services. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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