Lab Environment:
VM Virtual Machines
CentOS Operating System
The first way: through scripting
[Email protected] ~]# CD/ETC/INIT.D
[Email protected] init.d]# Pkill PHP-FPM
[Email protected] init.d]# Ps-ef|grep PHP-FPM
Root 1657 1629 0 23:11 pts/0 00:00:00 grep php-fpm
[email protected] init.d]# VI php-fpm # script See attachment
[email protected] init.d]# chmod a+x php-fpm # Add Execute Permissions
[email protected] init.d]# chkconfig--add php-fpm # Join the service
[email protected] init.d]# chkconfig php-fpm on # Boot auto Start service
[[Email protected] init.d]# service PHP-FPM start
[Email protected] init.d]# Ps-ef|grep PHP-FPM
Root 1673 1 0 23:13? 00:00:00 Php-fpm:master Process (/application/php5.3.27/etc/php-fpm.conf)
Nginx 1674 1673 0 23:13? 00:00:00 Php-fpm:pool www
Nginx 1675 1673 0 23:13? 00:00:00 Php-fpm:pool www
Root 1677 1629 0 23:13 pts/0 00:00:00 grep php-fpm
The second way:
[Email protected] ~]# vi/etc/rc.local
#追加到末尾
/application/php/sbin/php-fpm
This article is from the "sky9890" blog, make sure to keep this source http://sky9896.blog.51cto.com/2330653/1881203
PHP-FPM Auto Start mode