Reputation: 375
I've looked around for this topic, but all of the questions related to upgrading php on centOS seem to be pretty outdated. I found https://www.zerostopbits.com/how-to-upgrade-php-5-3-to-php-5-6-on-centos-6-7/ and it seems fairly simple; however, I am not familiar with installing new repos.
There seems to be a decent amount of repos that have the php 5.6 package I need, but I am unsure which would be considered the best or the safest.
Also, is there any incompatibility I should be aware of since CentOS does not offer the most recent version?
Upvotes: 3
Views: 3293
Reputation: 1227
This is the easiest way that worked for me: To install PHP 5.6 on CentOS 6 or 7:
CentOS 6. Enter the following commands in the order shown:
yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
CentOS 7. Enter the following commands in the order shown:
yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget https://centos7.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
See how to upgrade to PHP 7 and more at: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html
Upvotes: 4