Knowledgebase
Mirpur Online > Support Ticket > Knowledgebase

Search help:


How to Install stable version of PHP 5.4, PHP 5.5 or PHP 5.6 on a CentOS 6

Solution

Install EPEL and Remi Repository

1. To install latest stable version of PHP, you need to add EPEL and Remi repository to your CentOS 6 distribution using the following commands as root user.

# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# rpm -Uvh epel-release-6-8.noarch.rpm remi-release-6.rpm

Install Yum-Utils to Manage Repository

2. Install yum-utils, a collection of utilities that integrate with yum to extend its native features in several ways, thus making it more powerful and easier to use.The package yum-utils used to enable or disable packages on the fly without any manual configuration.

# yum install yum-utils

Install PHP 5.4, PHP 5.5 or PHP 5.6 on CentOS 6

3. Once EPELRemi and yum-utils has been installed, you can now move ahead to install PHP 5.4PHP 5.5 or PHP 5.6 with all required modules on CentOS 6 distribution by enabling remi repository using yum-config-manager command as shown.

# yum-config-manager --enable remi-php54    [Intall PHP 5.4]
# yum-config-manager --enable remi-php55    [Intall PHP 5.5]
# yum-config-manager --enable remi-php56    [Intall PHP 5.6]

4. Once you’ve enabled selected version of PHP, you can install PHP (in my case I have chosen PHP 5.6) with all needed modules as shown.

# yum-config-manager --enable remi-php56    [Intall PHP 5.6]
# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo 

If you want to downgrade PHP version for any reason, you will need to remove existing PHP version and then reinstall the new PHP with modules you want.

 
Was this article helpful? yes / no
Related articles How to Install PhpMyAdmin on CentOS 6.9?
How to Install Apache, MySQL, and PHP on CentOS 6.10
How to Install Apache, MySQL and PHP on Ubuntu 16.04
BDCOM EPON OLT (P3608B/P3616/P3310D) basic configuration through CLI
Article details
Article ID: 8
Category: Knowledgebase
Views: 663
Rating (Votes): Article rated 3.1/5.0 (15)

 
« Go back

 
Powered by Help Desk Software HESK, in partnership with SysAid Technologies