I'm trying to get PHP installed on my Linux device which already has Monkey Server installed, I do not have Apache installed. I want to be able to use FastCGI. I've downloaded and installed PHP7 according to these and these instructions and made sure the files are setup correctly; for the second link I did not install all of the packages listed at the beginning but most are already installed. The problem I am having is when I execute /etc/init.d/php-fpm start
I get a list of errors which are generated from the script trying to run
/sbin/php-fpm
, the errors are as follows:
- Starting php-fpm
- /sbin/php-fpm: line 1: [Unit]: command not found
- /sbin/php-fpm: line 2: PHP: command not found
- /sbin/php-fpm: line 3: network.target: command not found
- /sbin/php-fpm: line 5: [Service]: command not found
- /sbin/php-fpm: line 8: --nodaemonize: command not found
- /sbin/php-fpm: line 9: -USR2: command not found
- /sbin/php-fpm: line 11: [Install]:
- command not found ................................... failed
The /sbin/php-fpm
file is as follows:
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=@php_fpm_systemd@
PIDFile=@localstatedir@/run/php-fpm.pid
ExecStart=@sbindir@/php-fpm --nodaemonize --fpm-config @sysconfdir@/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
[Install]
WantedBy=multi-user.target
Lastly, I am running on a Yocto build of Linux so I do not have the luxury of sudo apt-get install <package>
. The second hyperlink from above I couldn't complete the instructions involving the commands insserv
and systemctl
because those two commands are not present.
Any help is appreciated, I just want FastCGI on a lightweight server for embedded Linux. If there are better options I am open to them but Apache is too big.
Edit:
I believe now my issues may be because I do not have systemd
on my Linux distrubution which is why it is not handling items like [Unit]
. Could someone please comment on this? I'm not familiar with systemd
.