Centos7 deploy PHP Project (PHP + nginx + mysql)

nginx integrate php-fpm:

Edit php-fpm.conf profile

; Last line read as follows 
include = / usr / local / etc / php-fpm.d / * conf.

Enter /etc/php-fpm.d/ directory, modify www.conf

The user and group, and consistent user and group into the nginx.conf

nginx.conf in the / etc / nginx / directory

user = nginx

group = www

Nginx restart the service:

[root@instance-ozyu8y37 nginx]# ps aux|grep nginx

root      19342  0.0  0.2 121472  5340 ?        Ss   Nov29   0:00 nginx: master process /usr/sbin/nginx

nginx     92824  0.0  0.2 124012  4712 ?        S    08:54   0:00 nginx: worker process

nginx     93326  0.0  0.2 323920  5104 ?        S    09:04   0:00 php-fpm: pool www

nginx     93327  0.0  0.3 328192  6656 ?        S    09:04   0:00 php-fpm: pool www

nginx     93328  0.0  0.3 328192  6652 ?        S    09:04   0:00 php-fpm: pool www

nginx     93329  0.0  0.2 323920  5104 ?        S    09:04   0:00 php-fpm: pool www

nginx     93330  0.0  0.2 323920  5108 ?        S    09:04   0:00 php-fpm: pool www

root      94081  0.0  0.0 112704   972 pts/0    R+   09:17   0:00 grep --color=auto nginx

[root@instance-ozyu8y37 nginx]# kill -USR2 19342

Restart PHP services:

[root@instance-ozyu8y37 nginx]# ps aux|grep php-fpm

root      17600  0.0  0.5 321836 11012 ?        Ss   Nov29   2:42 php-fpm: master process (/etc/php-fpm.conf)

nginx     93326  0.0  0.2 323920  5104 ?        S    09:04   0:00 php-fpm: pool www

nginx     93327  0.0  0.3 328192  6656 ?        S    09:04   0:00 php-fpm: pool www

nginx     93328  0.0  0.3 328192  6652 ?        S    09:04   0:00 php-fpm: pool www

nginx     93329  0.0  0.2 323920  5104 ?        S    09:04   0:00 php-fpm: pool www

nginx     93330  0.0  0.2 323920  5108 ?        S    09:04   0:00 php-fpm: pool www

root      94145  0.0  0.0 112708   972 pts/0    S+   09:18   0:00 grep --color=auto php-fpm

[root@instance-ozyu8y37 nginx]# kill -USR2 17600

Guess you like

Origin blog.csdn.net/weixin_41808843/article/details/88979405