PHP 5.6 as Software Collection
+
Par Remi le lundi 25 août 2014, 10:46 - HowTo - Lien permanent
RPM of upcoming new major version of PHP 5.6, are available in remi repository for Fedora 19, 20, 21 and Enterprise Linux 6, 7 (RHEL, CentOS, ...) in a fresh new Software Collection (php56) allowing its installation beside the system version.
As I strongly believe in SCL potential to provide a simple way to allow installation of various versions simultaneously, and as I think it is useful to offer this feature to allow developers to test their applications, to allow sysadmin to prepare a migration or simply to use this version for some specific application, I decide to create this new SCL.
Installation :
yum --enablerepo=remi install php56
To be noticed:
- as the SCL is independant from the system, and doesn't alter it, this SCL is available in remi repository
- installation is under the /opt/remi tree
- the Apache module, php56-php, is available, but of course, only one mod_php can be used (so you have to disable or uninstall any other, the one provided by the default "php" package still have priority)
- the FPM service (php56-php-fpm) is available, it listens on default port 9000, so you have to change the configuration if you want to use various FPM services simultaneously.
- the php56 command give a simple access to this new version, however the scl command is still the recommended way.
for now, the collection provides 5.6.0RC4, but stable version should be released soon.morePECL extensionswill be progressivelyare also available.- only x86_64, no plan for other arch.
Also read other entries about SCL.
$ scl enable php56 'php -v'
PHP 5.6.0 (cli) (built: Aug 28 2014 08:14:49)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
As always, your feedback is welcome, a SCL dedicated forum is open.
Commentaires
To answer a (privately asked) question: this doesn't means I will stop to maintain the remi-php56 repository. Users will have the choice between:
Most PECL extensions are now also available.
With Fedora, I just change the php-fpm configuration and add a new virtual host to apache .
/opt/remi/php56/root/etc/php-fpm.d/www.conf
/etc/httpd/conf.d/php56scl.conf
Thus, installed applications are available through http://localhost using mod_php (system version) and http://php56scl using php-fpm (version 5.6 from SCL).
Update tp PHP 5.6.0 GA
If you want to use the remi repository on for SCL, you just have to add, in the repository configuration file, /etc/yum.repos.d/remi.repo:
The php56 SCL is now also available for Fedora 21