Install PHP 5.6 on CentOS 7 Server

Step 1: To install PHP 5.6 on CentOS 7, you need to install remi repository.

# yum install -y epel-release
# wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm
# rpm -ivh remi-release-7.rpm
# yum update

 

Step 2: Now you can install PHP 5.6 with

# yum install php56 php56-php php56-php-mysqlnd php56-php-gd php56-php-mcrypt php56-php-mbstring php56-php-xml php56-php-cli

 

Step 3: If you need ioncube loader, install it with

#yum install php56-php-ioncube-loader