当前版本安装后php-fpm无法启动,需要手动修改/usr/lib/systemd/system/php-fpm.service里面的路径才行!!!忘记保留status信息了,修改里面的${prefix}为/usr/local/php/好像!!
3 Answers
装完后systemctl start php-fpm 和 service php-fpm start都不行的,我装了两个版本php都是一样,还是得手动修改
[root@localhost ~]# systemctl status php-fpm.service
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Dec 13 14:37:27 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/php-fpm.service:7] Not an absolute path, ignoring: ${prefix}/va...fpm.pid
Dec 13 14:37:27 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/php-fpm.service:8] Executable path is not absolute, ignoring: $...pm.conf
Dec 13 14:37:27 localhost.localdomain systemd[1]: php-fpm.service lacks both ExecStart= and ExecStop= setting. Refusing.
Dec 13 14:37:27 localhost.localdomain systemd[1]: Cannot add dependency job for unit php-fpm.service, ignoring: Unit is not loaded properl...gument.
Hint: Some lines were ellipsized, use -l to show in full.
_____________________________________________
[root@localhost ~]# systemctl status php-fpm.service
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Dec 13 14:37:27 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/php-fpm.service:7] Not an absolute path, ignoring: ${prefix}/va...fpm.pid
Dec 13 14:37:27 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/php-fpm.service:8] Executable path is not absolute, ignoring: $...pm.conf
Dec 13 14:37:27 localhost.localdomain systemd[1]: php-fpm.service lacks both ExecStart= and ExecStop= setting. Refusing.
Dec 13 14:37:27 localhost.localdomain systemd[1]: Cannot add dependency job for unit php-fpm.service, ignoring: Unit is not loaded properl...gument.
Hint: Some lines were ellipsized, use -l to show in full.
_____________________________________________
vim /usr/lib/systemd/system/php-fpm.service
将其中的${prefix}和${exec_prefix}改成/usr/local/php然后保存
重新启动系统
reboot
Please login or Register to submit your answer