ubuntu環境下啟動php-fpm失敗Job for php-fpm.service failed...
root@4fun:~# service php-fpm start
Job for php-fpm.service failed because the control process exited with error code. See "systemctl status php-fpm.service" and "journalctl -xe" for details.
檢視原因:
root@4fun:~# systemctl status php-fpm.service
● php-fpm.service - LSB: starts php-fpm
Loaded: loaded (/etc/init.d/php-fpm; bad; vendor preset: enabled)
Drop-In: /etc/systemd/system/php-fpm.service.d
└─override.conf
Active: failed (Result: exit-code) since Thu 2018-05-17 17:14:02 CST; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 27858 ExecStop=/etc/init.d/php-fpm stop (code=exited, status=0/SUCCESS)
Process: 28308 ExecStart=/etc/init.d/php-fpm start (code=exited, status=1/FAILURE)
May 17 17:14:02 xcys systemd[1]: Starting LSB: starts php-fpm...
May 17 17:14:02 xcys php-fpm[28308]: Starting php-fpm [17-May-2018 17:14:02] WARNING: Nothing matches the include pattern '/usr/local/php/etc/php-fpm.d/*.conf' from /usr
May 17 17:14:02 xcys php-fpm[28308]: [17-May-2018 17:14:02] ERROR: No pool defined. at least one pool section must be specified in config file
May 17 17:14:02 xcys php-fpm[28308]: [17-May-2018 17:14:02] ERROR: failed to post process the configuration
May 17 17:14:02 xcys php-fpm[28308]: [17-May-2018 17:14:02] ERROR: FPM initialization failed
May 17 17:14:02 xcys php-fpm[28308]: failed
May 17 17:14:02 xcys systemd[1]: php-fpm.service: Control process exited, code=exited status=1
May 17 17:14:02 xcys systemd[1]: Failed to start LSB: starts php-fpm.
May 17 17:14:02 xcys systemd[1]: php-fpm.service: Unit entered failed state.
May 17 17:14:02 xcys systemd[1]: php-fpm.service: Failed with result 'exit-code'.
原因是在/usr/local/php/etc/php-fpm.d目錄下缺少對應的.conf配置檔案
安裝php-fpm時候系統會自動生成一個預設的配置檔案,進入php-fpm.d資料夾可以看到:
root@4fun:~# cat /usr/local/php/etc/php-fpm.d/www.conf.default
.bash_history .cache/ .my.cnf .profile .vim/ lnmp-install.log
.bashrc .composer/ .pearrc .ssh/ .viminfo lnmp1.4/
root@4fun:~# cat /usr/local/php/etc/php-fpm.d/www.conf.default
.bash_history .cache/ .my.cnf .profile .vim/ lnmp-install.log
.bashrc .composer/ .pearrc .ssh/ .viminfo lnmp1.4/
root@4fun:~# cat /usr/local/php/etc/php-fpm.d/www.conf.default
.bash_history .cache/ .my.cnf .profile .vim/ lnmp-install.log
.bashrc .composer/ .pearrc .ssh/ .viminfo lnmp1.4/
root@4fun:~# cd /usr/local/php/etc/php-fpm.d/
root@4fun:/usr/local/php/etc/php-fpm.d# ls
www.conf.default
將該檔案複製一份重新命名問*.conf名稱,重新啟動php-fpm即可
root@4fun:/usr/local/php/etc/php-fpm.d# cp www.conf.default www.conf
root@4fun:/usr/local/php/etc/php-fpm.d# ls
www.conf www.conf.default
root@4fun:/usr/local/php/etc/php-fpm.d# service php-fpm start
相關文章
- Ubuntu22.4環境下npm下載gdal失敗UbuntuNPM
- 雲伺服器ubuntu下nginx和php-fpm環境配置伺服器UbuntuNginxPHP
- docker啟動失敗Docker
- tomcat 啟動失敗Tomcat
- easyswoole啟動失敗
- sqlplus啟動失敗SQL
- MySQL啟動失敗MySql
- 解決virtualbox下Ubuntu磁碟擴充套件後修改fstab啟動失敗的記錄Ubuntu套件
- mac下啟動laradock失敗--Service ‘workspace‘ failed to buildMacAIUI
- ubuntu環境下搭建以太坊開發環境Ubuntu開發環境
- Win7 Nginx啟動失敗 cmd命令失敗Win7Nginx
- Ubuntu下Java環境的搭建UbuntuJava
- 如何解決GitHub Actions在Ubuntu 18.04上啟動失敗問題GithubUbuntu
- dota2啟動失敗 初始化vulkan失敗
- 如何解決GitHub Actions在Ubuntu 18.04上啟動失敗的問題GithubUbuntu
- Linux使用Ambari啟動服務啟動失敗Linux
- ubuntu環境下安裝perf工具Ubuntu
- 在Ubuntu環境下安裝eclipseUbuntuEclipse
- VLC在ubuntu環境下編譯編譯
- Oracle RAC啟動失敗(DNS故障)OracleDNS
- 問題一:Kibaba 啟動失敗
- sqlserver服務啟動失敗-1067SQLServer
- dbsnmp啟動失敗解決方法
- Hadoop 啟動namenode節點失敗Hadoop
- 在新裝Homestead環境下,Redis連線失敗的解決辦法。Redis
- 【環境踩坑】ubuntu下jupyter的環境設定問題Ubuntu
- 事故分享——關於Conda啟用環境失敗並報gbk相關錯誤
- Jenkins allure report 路徑使用環境變數失敗Jenkins變數
- python+selenium環境搭建,pip安裝selenium失敗Python
- ubuntu 下gerrit 伺服器環境搭建Ubuntu伺服器
- Ubuntu下Python & Django開發環境搭建UbuntuPythonDjango開發環境
- mongodb啟動失敗問題解決MongoDB
- mysql(mariadb)啟動失敗解決方法MySql
- hbase啟動失敗問題解決
- ubuntu核心切換失敗,無法啟動,bios不停檢測情況修復UbuntuiOS
- 出現“登入失敗,表單提交校驗失敗”,請檢查伺服器環境伺服器
- Homestead 環境安裝 horizon 一直顯示失敗
- 《爐石傳說》的退環境機制失敗在哪