Dev Loots Dev Loots - 4 months ago 23
PHP Question

Php7-fpm is no running Centos7

I would like to start php7-fpm on CentOs.

I start fpm with the following command :

systemctl start php7-fpm.service


I have no error, and php7-fpm is no running ('netstat -lntp`)

When I execute this command
systemctl status php7-fpm.service
, I get this :

systemctl status php7-fpm.service
● php7-fpm.service - LSB: starts php7-fpm
Loaded: loaded (/etc/rc.d/init.d/php7-fpm)
Active: active (exited) since mar. 2016-07-12 17:12:43 CEST; 15h ago
Docs: man:systemd-sysv-generator(8)
Process: 818 ExecStart=/etc/rc.d/init.d/php7-fpm start (code=exited, status=0/SUCCESS)

juil. 12 17:12:42 centos7 systemd[1]: Starting LSB: starts php7-fpm...
juil. 12 17:12:42 centos7 php7-fpm[818]: /etc/rc.d/init.d/php7-fpm: ligne40: init_is_upstart : command not found
juil. 12 17:12:42 centos7 php7-fpm[818]: /etc/rc.d/init.d/php7-fpm: ligne119: log_daemon_msg : command not found
juil. 12 17:12:43 centos7 php7-fpm[818]: /etc/rc.d/init.d/php7-fpm: ligne68: start-stop-daemon : command not found
juil. 12 17:12:43 centos7 php7-fpm[818]: /etc/rc.d/init.d/php7-fpm: ligne125: log_end_msg : command not found
juil. 12 17:12:43 centos7 systemd[1]: Started LSB: starts php7-fpm.
juil. 12 17:24:51 centos7 systemd[1]: Started LSB: starts php7-fpm.


How I can run php7-fpm ?

Answer

The problem is that the used function in php7-fpm script are not definied. So, you should create or update many files. In your php7-fpm file, there are files included for use some data or functions.

  • /lib/lsb/init-functions (Import some functions)
  • /lib/init/vars.sh (Import data)

Vérify existing init-functions and vars.sh file and try to reload php7-fpm.

Moreover, the command start-stop-daemon doesn't exist on CentOS. You should install manually :

wget http://blog.starcklin.com/files/dpkg_1.17.6.tar.xz
tar -xf dpkg_1.17.6.tar.xz
cd dpkg-1.17.6

sudo yum install ncurses-devel ncurses

./configure
make

cd utils
make

cc start-stop-daemon.c -o start-stop-daemon

sudo cp start-stop-daemon /usr/local/bin
Comments