Install php 5.6 on CentOS 7 using yum

Install php 56 on CentOS 7 using yum

In this tutorial, I will show how to install php 56 on CentOS 7 using yum.

Update the system

Firstly update the centos using the following command:

yum update -y

Read Also: How to install LAMP on centos 7

Add EPEL repo

Now we will add epel repo using yum:

yum install -y epel-release

Add IUS repo

Now we will add IUS repo. Use the following command to add ius repo:

rpm -Uvh ius-release*.rpm
yum -y update

Read Also: How to install WordPress on centos 7
Read Also: How to install Joomla on centos 7 

Install php 56

Now we have added IUS repo now we can install php and some other dependencies:

yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath

Check php version

Now we have installed php let’s check the php version:

php -v
PHP 5.6.31 (cli) (built: Jul 7 2017 08:13:05)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

If you have any issues using this tutorial please feel free to comment below.

Read Also: How to install drupal 8 on CentOS 7

Leave a Reply

Your email address will not be published.


The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99