Topic: How to stop php-fpm starting up with Apache
I am on an RHEL 8 clone. Unlike the RHEL 7 clones, the php-fpm packages include a file in that adds a Wants= directive for systemd, to load that version of php-fpm.
On a system I am running, several different php-fpm packages are installed, and a script stops and starts the one desired. This all worked fine on RHEL 7. However, on updating to RHEL 8, because of the above files/Wants starting Apache causes an attempt to start all the different php-fpm services (and the one that actually starts is indeterminate - the others fail because the first one is already listening on the configured TCP port, so no others can get it).
In short: I want multiple versions of php-fpm to be installed, but only one to run, and I'm using Apache. How should I achieve this? I could just delete all the above files - but they'll come back on a package update, so I'll have to keep deleting them. I haven't been able to find what systemctl command would be needed to ignore those files - perhaps there isn't one.
Another variation of the problem is on servers where I ultimately only want to run one php-fpm, but two are currently installed because we're doing an upgrade to a more recent PHP version. The two installed are the old and the new version. But whenever httpd is restarted, both php-fpm versions then get started and contend for the socket.
Any ideas? Thank you!