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
- 在winxp + oracle9i環境下,進行手工啟動資料庫失敗Oracle資料庫
- 雲伺服器ubuntu下nginx和php-fpm環境配置伺服器UbuntuNginxPHP
- MySQL啟動失敗MySql
- docker啟動失敗Docker
- Windows環境下Rails安裝Bootstrap失敗解決方法WindowsAIboot
- tomcat 啟動失敗Tomcat
- ubuntu下golang環境配置UbuntuGolang
- Win7 Nginx啟動失敗 cmd命令失敗Win7Nginx
- ubuntu環境下搭建以太坊開發環境Ubuntu開發環境
- Windows環境下Redis啟動多例項WindowsRedis
- linux環境下ORACLE自啟動LinuxOracle
- 再一次MAA環境下switchover失敗經驗分享
- sqlplus啟動失敗SQL
- linux smartd啟動失敗Linux
- dota2啟動失敗 初始化vulkan失敗
- mac下啟動laradock失敗--Service ‘workspace‘ failed to buildMacAIUI
- 解決virtualbox下Ubuntu磁碟擴充套件後修改fstab啟動失敗的記錄Ubuntu套件
- Ubuntu下Java環境的搭建UbuntuJava
- ubuntu下安裝boost環境Ubuntu
- ubuntu下hadoop環境配置UbuntuHadoop
- oracle對JOB失敗的處理Oracle
- 如何解決GitHub Actions在Ubuntu 18.04上啟動失敗問題GithubUbuntu
- WINDOWS環境下ORACLE啟動的問題WindowsOracle
- Oracle RAC啟動失敗(DNS故障)OracleDNS
- dbsnmp啟動失敗解決方法
- 監聽啟動失敗解決
- init.cssd程式啟動失敗CSS
- informix資料庫啟動失敗ORM資料庫
- VLC在ubuntu環境下編譯編譯
- Ubuntu環境下Tornado環境部署Ubuntu
- ubuntu環境下安裝perf工具Ubuntu
- Linux使用Ambari啟動服務啟動失敗Linux
- 在linux環境下啟動時開啟numlock(轉)Linux
- 如何解決GitHub Actions在Ubuntu 18.04上啟動失敗的問題GithubUbuntu
- CentOS 7下MySQL服務啟動失敗的解決思路CentOSMySql
- 《爐石傳說》的退環境機制失敗在哪
- Hadoop 啟動namenode節點失敗Hadoop