How to reload/restart php7.0-fpm / php5.0-fpm service
来源:互联网 发布:思迅天店软件好不好 编辑:程序博客网 时间:2024/06/14 11:30
I am a new Linux and Unix system user. I want to reload or restart my PHP-fpm service. How do I restart PHP-fpm? How do you restart php7.0-fpm on Ubuntu Linux 16.04 LTS server?
PHP-FPM is nothing but a straightforward and robust FastCGI Process Manager for PHP. You can use it with Apache, Nginx, and other web servers. It includes many advanced features. Let us see how to stop or restart or reload PHP-FPM after you update php.ini file.
How do I edit php.ini or www.conf file?
To edit php.ini type:
$ sudo vi /etc/php5/php.ini
OR
$ sudo vi /etc/php/7.0/fpm/php.ini
To edit php-fpm config file:
$ sudo vi /etc/php/7.0/fpm/php-fpm.conf
$ sudo vi /etc/php/7.0/fpm/pool.d/www.conf
Once edited, save and close the file. Now you need to run command as per your Linux/Unix distro version after editing the file.
Start php-fpm on CentOS/RHEL 7
$ sudo systemctl start php-fpm
Stop php-fpm CentOS/RHEL 7
$ sudo systemctl stop php-fpm
Reload php-fpm CentOS/RHEL 7
$ sudo systemctl reload php-fpm
Restart php-fpm CentOS/RHEL 7
$ sudo systemctl restart php-fpm
Start/stop/restart/reload php-fpm on CentOS/RHEL 6.x or older
Type the following command:
$ sudo service php-fpm start # <- start it
$ sudo service php-fpm stop # <- stop it
$ sudo service php-fpm restart # <- restart it
$ sudo service php-fpm reload # <- reload it
How to start/stop/restart/reload php5-fpm (php version 5.x) on Ubuntu/Debian Linux
$ sudo service php5-fpm start
$ sudo service php5-fpm stop
$ sudo service php5-fpm restart # <- restart it
$ sudo service php5-fpm reload # <- reload it
OR if you are using systemd based distro such as Ubuntu Linux 16.04+ LTS or Debian Linux 8.x+:
$ sudo systemctl start php7.0-fpm.service
$ sudo systemctl stop php5-fpm.service
$ sudo systemctl restart php5-fpm.service # <- restart it
$ sudo systemctl reload php5-fpm.service # <- reload it
How to start/stop/restart/reload php7.0-fpm (php version 7.x) on Ubuntu/Debian Linux
$ sudo service php7.0-fpmstart
$ sudo service php7.0-fpm stop
$ sudo service php7.0-fpm restart # <- restart it
$ sudo service php7.0-fpm reload # <- reload it
OR if you are using systemd based distro such as Ubuntu Linux 16.04+ LTS or Debian Linux 8.x+:
$ sudo systemctl start php7.0-fpm.service
$ sudo systemctl stop php7.0-fpm.service
$ sudo systemctl restart php7.0-fpm.service # <- restart it
$ sudo systemctl reload php7.0-fpm.service # <- reload it
How do you restart/reload php-fpm on Alpine Linux?
The syntax is:
# /etc/init.d/php-fpm start# /etc/init.d/php-fpm stop# /etc/init.d/php-fpm restart # <- restart it
How do you restart/reload php-fpm on FreeBSD unix?
The syntax is
# /usr/local/etc/rc.d/php-fpm start# /usr/local/etc/rc.d/php-fpm stop# /usr/local/etc/rc.d/php-fpm reload # <- reload it# /usr/local/etc/rc.d/php-fpm restart # <- restart it
OR use the service command:
# service php-fpm start# service php-fpm stop# service php-fpm restart# service php-fpm reload
Posted by: Vivek Gite
The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.
SHARE THIS ON:
- How to reload/restart php7.0-fpm / php5.0-fpm service
- service php-fpm restart
- Ubuntu16.10下php7.0-fpm与Nginx配置
- ubuntu下安装php7.0fpm+mysql5.7+nginx
- PHP-FPM stop/reload: Unknown instance, service status `stop/waiting`
- ubuntu12.04安装php5-fpm 出错connect() to unix:/var/run/php5-fpm.sock
- Ubuntu 14.04 php7.0 php7.0-fpm nginx 环境搭建备注
- ubuntu 安装 nginx php7.0-fpm mysql-server php7.0-mysql
- php-fpm的reload过程
- ubuntu14.04 +nginx+php5-fpm
- ubuntu14.04 +nginx+php5-fpm
- ubuntu14.04 +nginx+php5-fpm
- How to install PHP-FPM (spawn-fcgi replacement)
- ubuntu搭建 nginx+php7+php-fpm+mysql
- How To Start / Restart / Stop Network and Routing Service
- docker中运行lnmp环境界面502,nginx错误日志提示/run/php/php7.0-fpm.sock failed
- php-fpm添加service服务
- centos7安装php7 php-fpm nginx mariadb及解决php7与php-fpm冲突的问题
- POJ
- HDU1060 Leftmost Digit
- Linux驱动编程——设备树
- uikit——Auto Layout——UIView——constraint
- Unity3D学习记录——NGUI Sprit2
- How to reload/restart php7.0-fpm / php5.0-fpm service
- 类模板-
- 单链表的基础面试题
- python 37 pandas操作csv文件小结,csv文件合并
- CSU-ACM2017暑假集训2-二分搜索 F
- offer面试题----打印1到最大的n位数
- 【网络开发】详谈socket请求Web服务器过程
- 初识MFC遇到的一个问题string与ctring
- js:利用文档就绪函数动态改变页面内容(innerHTML、innerText)