Reputation: 492
php 7 built from sources
While trying
systemctl enable php-fpm.service
get
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
While trying
chkconfig --levels 235 php-fpm on
get the same log :)
Update:
Somehow I managed to start by chkconfig
, but i dont remember how. After reinstall OS and using PHP 7.0.6-dev
.
Upvotes: 3
Views: 9205
Reputation: 492
Now, as for php 7.3, I use such approach after build php:
1. cp /path-to-php-src/sapi/fpm/php-fpm.service /etc/systemd/system/php-fpm.service
2. systemctl enable php-fpm.service
Content of file is similar to answer of Renato Mefi
Upvotes: 1
Reputation: 2171
Since you are compiling your own PHP the unit/service need to be created, you can do it via chkconfig as you did or you can try to follow some guidelines, which I would recomend:
https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/
Example file from the first tutorial:
[Unit]
Description=The PHP 7 FastCGI Process Manager
After=network.target
[Service]
Type=simple
PIDFile=/opt/php-7.0.3/var/run/php-fpm.pid
ExecStart=/opt/php-7.0.3/sbin/php-fpm --nodaemonize --fpm-config /opt/php-7.0.3/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
[Install]
WantedBy=multi-user.target
I saw the updated you already solved the issue, but I'll leave it here since it can help more people!
Upvotes: 3