php now requires php-fpm and start it with httpd / nginx

This commit is contained in:
Remi Collet 2017-09-25 11:40:05 +02:00
parent 59a9fefc43
commit de56edf226
3 changed files with 16 additions and 4 deletions

3
php-fpm.wants Normal file
View File

@ -0,0 +1,3 @@
[Unit]
Wants=php-fpm.service

View File

@ -67,7 +67,7 @@
Summary: PHP scripting language for creating dynamic web sites Summary: PHP scripting language for creating dynamic web sites
Name: php Name: php
Version: %{upver}%{?rcver:~%{rcver}} Version: %{upver}%{?rcver:~%{rcver}}
Release: 1%{?dist} Release: 2%{?dist}
# All files licensed under PHP version 3.01, except # All files licensed under PHP version 3.01, except
# Zend is licensed under Zend # Zend is licensed under Zend
# TSRM is licensed under BSD # TSRM is licensed under BSD
@ -87,6 +87,7 @@ Source6: php-fpm.service
Source7: php-fpm.logrotate Source7: php-fpm.logrotate
Source9: php.modconf Source9: php.modconf
Source10: php.ztsmodconf Source10: php.ztsmodconf
Source12: php-fpm.wants
Source13: nginx-fpm.conf Source13: nginx-fpm.conf
Source14: nginx-php.conf Source14: nginx-php.conf
# Configuration files for some extensions # Configuration files for some extensions
@ -152,6 +153,7 @@ Provides: mod_php = %{version}-%{release}
Requires: php-common%{?_isa} = %{version}-%{release} Requires: php-common%{?_isa} = %{version}-%{release}
# For backwards-compatibility, require php-cli for the time being: # For backwards-compatibility, require php-cli for the time being:
Requires: php-cli%{?_isa} = %{version}-%{release} Requires: php-cli%{?_isa} = %{version}-%{release}
Requires: php-fpm%{?_isa} = %{version}-%{release}
# To ensure correct /var/lib/php/session ownership: # To ensure correct /var/lib/php/session ownership:
Requires(pre): httpd-filesystem Requires(pre): httpd-filesystem
# php engine for Apache httpd webserver # php engine for Apache httpd webserver
@ -1224,8 +1226,9 @@ install -m 755 -d $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/php-fpm.conf install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/php-fpm.conf
# install systemd unit files and scripts for handling server startup # install systemd unit files and scripts for handling server startup
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/php-fpm.service.d install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/php-fpm.service.d
install -m 755 -d $RPM_BUILD_ROOT%{_unitdir} install -Dm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/php-fpm.conf
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/ install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/php-fpm.conf
install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/php-fpm.conf
# LogRotate # LogRotate
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
@ -1438,6 +1441,8 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf %config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf
%{_prefix}/lib/tmpfiles.d/php-fpm.conf %{_prefix}/lib/tmpfiles.d/php-fpm.conf
%{_unitdir}/php-fpm.service %{_unitdir}/php-fpm.service
%{_unitdir}/httpd.service.d/php-fpm.conf
%{_unitdir}/nginx.service.d/php-fpm.conf
%{_sbindir}/php-fpm %{_sbindir}/php-fpm
%dir %{_sysconfdir}/systemd/system/php-fpm.service.d %dir %{_sysconfdir}/systemd/system/php-fpm.service.d
%dir %{_sysconfdir}/php-fpm.d %dir %{_sysconfdir}/php-fpm.d
@ -1508,6 +1513,9 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%changelog %changelog
* Mon Sep 25 2017 Remi Collet <remi@fedoraproject.org> - 7.1.10~RC1-2
- php now requires php-fpm and start it with httpd / nginx
* Wed Sep 13 2017 Remi Collet <remi@fedoraproject.org> - 7.1.10~RC1-1 * Wed Sep 13 2017 Remi Collet <remi@fedoraproject.org> - 7.1.10~RC1-1
- Update to 7.1.10RC1 - Update to 7.1.10RC1

View File

@ -1,6 +1,7 @@
<IfModule !mod_php5.c> <IfModule !mod_php5.c>
<IfModule !prefork.c> <IfModule !prefork.c>
LoadModule php7_module modules/libphp7-zts.so # ZTS module is not supported, so FPM is preferred
# LoadModule php7_module modules/libphp7-zts.so
</IfModule> </IfModule>
</IfModule> </IfModule>