1.重启 apache
service httpd restrat
/etc/init.d/httpd stop
/etc/init.d/httpd start
2.重启 mysql
service mysql restart
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
3.重启Nginx
service nginx restart
/etc/init.d/nginx stop
/etc/init.d/nginx start
4.自php5.3.3开始,php源码中包含了php-fpm,不需要单独通过补丁的方式安装php-fpm,在源码安装的时候直接 configure 中增加参数 –enable-fpm 即可。
所以启动、关闭和重新加载的方式和以前不同,需要使用信号控制:
php-fpm master 进程可以理解一下信号:
SIGINT, SIGTERM 立刻终止
SIGQUIT 平滑终止
SIGUSR1 重新打开日志文件
SIGUSR2 平滑重载所有worker进程并重新载入配置和二进制模块
例如:关闭php-fpm
kill -SIGINT `cat /usr/local/php/var/run/php-fpm.pid`
php-fpm 重启
kill -SIGUSR2 `cat /usr/local/php/var/run/`