How to Upgrade PHP version 5.4 to 5.5 on CentOS/RHEL 5/6/7
By Anuket Jain On 16 May 2015 In Linux
PHP 5.5.0 has been released. The PHP improvement group is proud to report the immediate accessibility of PHP 5.5.0. This release includes countless of new features and bug fixes.
Features include in PHP 5.5.0 :
# php -v
PHP 5.4.35 (cli) (built: Nov 14 2014 07:04:10) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
For CentOS/RHEL 7:
# rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
For CentOS/RHEL 6:
# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
For CentOS/RHEL 5:
# rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
# yum remove php-common
Sample Output:
Dependencies Resolved =================================================================================== Package Arch Version Repository Size =================================================================================== Removing: php-common x86_64 5.4.39-1.el6.remi @remi 7.0 M Removing for dependencies: php x86_64 5.4.39-1.el6.remi @remi 9.1 M php-cli x86_64 5.4.39-1.el6.remi @remi 12 M php-devel x86_64 5.4.39-1.el6.remi @remi 8.1 M php-gd x86_64 5.4.39-1.el6.remi @remi 665 k php-ldap x86_64 5.4.39-1.el6.remi @remi 119 k php-mbstring x86_64 5.4.39-1.el6.remi @remi 2.5 M php-mcrypt x86_64 5.4.39-1.el6.remi @remi 86 k php-mysql x86_64 5.4.39-1.el6.remi @remi 452 k php-pdo x86_64 5.4.39-1.el6.remi @remi 348 k php-pear noarch 1:1.9.5-9.el6.remi @remi 2.0 M php-process x86_64 5.4.39-1.el6.remi @remi 128 k php-snmp x86_64 5.4.39-1.el6.remi @remi 107 k php-xml x86_64 5.4.39-1.el6.remi @remi 626 k Transaction Summary =================================================================================== Remove 14 Package(s) Installed size: 43 M
# yum -y install php55w php55w-opcache # yum -y install php55w-xml php55w-mcrypt php55w-gd php55w-devel php55w-mysql php55w-intl php55w-mbstring
# /etc/init.d/httpd restart
# php -v
PHP 5.5.23 (cli) (built: Apr 16 2015 22:49:36) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
Comments
Good Post. Thanks
Thanks.
Good Post.. helped me a lot..! Thanks…!
Thanks.
Good post!!! works on Centos 7
Thanks Flavio
Excelent post. Thanks from spain.
Canımsın 🙂
Thanks alot, this helped me!
It works
Thanks.
Excellent guide. Thank you.
Thanks
worked like a charm on centos 7 64bit
Hi there,
the upgrade from 5.4.x to 5.5.x is removing the php-mysql package too.
now the question is, after the new installation of php 5.5.x with the given packages, do I have to set up new mysql-users ? or will my script be able to connect to mysql server as usual?
Cheers
No, you do not need to create a MySQL user again.