提示:阿里云部署的轻量服务器,linux安装nginx
一、nginx重启
//检验配置
/usr/local/nginx/sbin/nginx -t
//重启
/usr/local/nginx/sbin/nginx -s reload
二、php重启
SIGINT, SIGTERM 立刻终止
SIGQUIT 平滑终止
SIGUSR1 重新打开日志文件
SIGUSR2 平滑重载所有worker进程并重新载入配置和二进制模块
##确定php-fpm配置正常
[root@iz2vcf47jzvf8dxrapolf7z php7.4]# /usr/local/php74/sbin/php-fpm -t
[02-Oct-201916:54:19] NOTICE: configuration file /usr/local/php74/etc/php-fpm.conf test is successful
##启动php-fpm
[root@izj6c0ct64t9oyhoeow593z php7.4]# ps -ef|grep php
root 1621 1603 0 09:31 pts/0 00:00:00 grep --color=auto php
[root@izj6c0ct64t9oyhoeow593z php7.4]# /usr/local/php74/sbin/php-fpm
[root@izj6c0ct64t9oyhoeow593z php7.4]# ps -ef|grep php|grep -v 'grep'
root 1626 1 0 09:32 ? 00:00:00 php-fpm: master process (/usr/local/php74/etc/php-fpm.conf)
www 1627 1626 0 09:32 ? 00:00:00 php-fpm: pool www
www 1628 1626 0 09:32 ? 00:00:00 php-fpm: pool www
##重启php-fpm(进程ID已改变)
[root@izj6c0ct64t9oyhoeow593z php7.4]# kill -SIGUSR2 `cat /usr/local/php74/var/run/php-fpm.pid`
[root@izj6c0ct64t9oyhoeow593z php7.4]# ps -ef|grep php|grep -v 'grep'
##关闭php-fpm进程
[root@izj6c0ct64t9oyhoeow593z php7.4]# kill -SIGINT `cat /usr/local/php74/var/run/php-fpm.pid` && ps -ef|grep php|grep -v 'grep'
[root@izj6c0ct64t9oyhoeow593z php7.4]# ps -ef|grep fpm
root 1682 1603 0 09:41 pts/0 00:00:00 grep --color=auto fpm