Enable and disable php-fpm restart in CentOS

Source: Internet
Author: User

Since php5.3.3, the php source code contains php-fpm. You do not need to install php-fpm by patching it separately, add the parameter-enable-fpm to configure when installing the source code.

Therefore, the method for starting, disabling, and reloading is different from that before. signal control is required:

The php-fpm master process can understand the signal:

SIGINT, SIGTERM immediately terminate SIGQUIT smoothly terminate SIGUSR1 re-open the log file SIGUSR2 smoothly Reload all worker processes and re-load the configuration and binary Module

For example, disable php-fpm.

Kill-SIGINT 'cat/usr/local/php/var/run/php-fpm.pid'

Php-fpm restart

Kill-SIGUSR2 'cat/usr/local/php/var/run/php-fpm.pid'

Note:/usr/local/php/var/run/php-fpm.pid refers to the file that stores the master process number, which is the default address and can be modified in the configuration, in addition, you can use the ps command to find the master process number, and then use the kill signal process number method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.