Red Hat will provide PHP 5.4 for RHEL-6
+
Par Remi le dimanche 16 juin 2013, 17:11 - HowTo - Lien permanent
Official announcement : Red Hat Software Collections 1.0 Beta Now Available
More information on Software Collections
- Software Collections Guide (Fedora project)
Stability addicts can keep quiet, PHP 5.3.3 is still the standard version provided with RHEL-6.
We'll soon have an official and supported way to install PHP version 5.4, beside the system version, without any effect on installed components. Announcement tells the life cycle will be 3 years.
it's a beta version, published for evaluation purpose.
Installation
Activation of the distribution channel (requires a valid subscription) from the RHN web interface or from command line:
# rhn-channel --add --channel=rhel-x86_64-server-6-rhscl-1-beta
Installation of the meta-package and default components:
# yum install php54
...
======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
php54 x86_64 1-7.el6 rhel-x86_64-server-6-rhscl-1-beta 3.3 k
Installing for dependencies:
php54-php-cli x86_64 5.4.14-3.el6 rhel-x86_64-server-6-rhscl-1-beta 2.6 M
php54-php-common x86_64 5.4.14-3.el6 rhel-x86_64-server-6-rhscl-1-beta 566 k
php54-php-pear noarch 1:1.9.4-7.el6 rhel-x86_64-server-6-rhscl-1-beta 370 k
php54-php-process x86_64 5.4.14-3.el6 rhel-x86_64-server-6-rhscl-1-beta 45 k
php54-php-xml x86_64 5.4.14-3.el6 rhel-x86_64-server-6-rhscl-1-beta 109 k
php54-runtime x86_64 1-7.el6 rhel-x86_64-server-6-rhscl-1-beta 1.0 M
Transaction Summary
======================================================================================================================================================
Install 7 Package(s)
Total download size: 4.7 M
Installed size: 0
Is this ok [y/N]: y
That's all ;)
Utilisation
Default version still 5.3.3
# php -v
PHP 5.3.3 (cli) (built: Nov 29 2012 04:12:23)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
You need to explicitly ask to use the SCL version, standard (SCL) way:
# scl enable php54 "php -v"
PHP 5.4.14 (cli) (built: May 23 2013 07:42:19)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
You can also use (for this collection, not supported for others):
# /opt/rh/php54/root/usr/bin/php -v
PHP 5.4.14 (cli) (built: May 23 2013 07:42:19)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
You can also permanently activate the collection:
# source /opt/rh/php54/enable
# php -v
PHP 5.4.14 (cli) (built: May 23 2013 07:42:19)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Use from Apache
Various way exist, we'll only see the mod_php case
# yum install php54-php
Warning : apache can't load 2 php5 modules, so if the standard module is already present, on apache startup, you will get the error message:
[Sun Jun 16 16:51:01 2013] [warn] module php5_module is already loaded, skipping
You need to uninstall (or disable) the standard module, and then apache will use the PHP 5.4 from the collection.
Conclusion
I think this is a very important new feature which should help for the adoption of recent PHP version in enterprise environment.
CentOS (or other clones) users can also try the packages available on the community project site : Software Collections
Questions, with no answer yet:
- For CentOS, will those packages be available in some official repository, or third-party (as the tru repo for DTS) ?
- Will a php55 collection exists ?
- Will packages for RHEL-5 be available ?
- Will EPEL be able to provide more extensions ?
- Which PHP version will be packaged in the finale RHSCL version ?
Commentaires
See: More PHP extensions for RHSCL
Update to 5.4.16 in my php54 personal repository which also provides RPM for EL-5 (RHSCL is only available for EL-6). Only for x86_64.
Article re-post, with more details, on Red Hat Developer Blog.
RHSCL 1.0 is now released. You just have to replace the channel: