How to Install PHP 5.2.X on CentOS 5

Last modified by 5live on Thu, June 24, 2010 15:23
Source|Old Revisions  

This is an old revision of the document!


The Remi repository install only supports the latest PHP version, which is currently 5.3.X. After searching around, I found PHP 5.2.X is still available from the CentOS testing repository.

To begin the install, start by adding the CentOS testing repository to yum

  cd /etc/yum.repos.d
  wget http://dev.centos.org/centos/5/CentOS-Testing.repo

Then import the gpg key for this repository as follows:

  rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

Now you are ready to install PHP 5.2.X from the CentOS repository (c5-testing).

  yum --enablerepo=c5-testing install php
  yum --enablerepo=c5-testing install mhash mcrypt php-mhash php-mcrypt

Or, If you are updating from an older PHP version:

  yum --enablerepo=c5-testing update php
  yum --enablerepo=c5-testing update mhash mcrypt php-mhash php-mcrypt

That’s it!

If you are doing a fresh LAMP install with Mysql:

  yum --enablerepo=c5-testing install php-mysql mysql mysql-server
  /sbin/chkconfig --levels 235 mysqld on
  /etc/init.d/mysqld start

Or, to just update Mysql:

  yum --enablerepo=c5-testing update mysql

Hope this helps...




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs