How to Install PHP 5.6 on CentOS 7

To install PHP 5.6, you have to install and enable EPEL and Remi repository.

# yum install

# yum install

# yum install yum-utils

If you want to install PHP 5.5, PHP 5.6 or PHP 7.2 on CentOS 7, just enable it and install as shown.

# yum-config-manager –enable remi-php55 [Install PHP 5.5]


# yum-config-manager –enable remi-php56 [Install PHP 5.6]

# yum-config-manager –enable remi-php72 [Install PHP 7.2]

We have chosen to install PHP 5.6.

# yum-config-manager –enable remi-php56 [Install PHP 5.6]

# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

Afterwards, double check the installed version of PHP on your system.

# php -v

Click to rate this post!
[Total: 0 Average: 0]

Share and Enjoy !

Get Weekly KBV Tips !

Learn and improve day to day Knowledge & lifestyles.