Check Current PHP Version Enter the following information to see the current PHP version:
php -v
It should output something like:
PHP 5.3.3 (cli) (built: July 9, 2015 5:39:00 p.m.) Copyright (c) 1997-2010 PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Install Remi and EPEL RPM repositories
If you havenβt already done so, install the Remi and EPEL repositories.
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm
Enable REMI repository globally:
nano /etc/yum.repos.d/remi.repo
In the section that looks like [remi], make the following changes:
[remi] name=Remi RPM repository for Enterprise Linux 6 - $basearch
In addition, the following changes are made to the section that looks like [remi-php55]:
[remi-php56] name=Remi PHP 5.6 RPM repository for Enterprise Linux 6 - $basearch
Enter CTRL-O to save and CTRL-X to close the editor
Upgrading PHP 5.3 to PHP 5.6 Now we can upgrade PHP. Just enter the following command:
yum -y upgrade php *
Once the update is complete, make sure you have PHP 5.6 installed:
php -v
Should see a result similar to the following:
PHP 5.6.14 (cli) (built: Sep 30 2015 14:07:43) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
Fouad Djebbar Aug 30 '16 at 17:19 2016-08-30 17:19
source share