How to Install PHP 5.2.X on CentOS 5




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
 
  // other necessary extensions
  yum --enablerepo=c5-testing install php-mhash php-mcrypt
  yum --enablerepo=c5-testing install php-gd
  yum --enablerepo=c5-testing install php-xml php-xmlrpc

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

  yum --enablerepo=c5-testing update php

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



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
PCI Compliance (Views: 4718)

Powered by WHMCompleteSolution

Why DOTNET SERVICES?

All web hosting plans come with the following cool features!
  • Powerful Control Panel
  • 24/7 Email Support
  • 30 Days Money Back Guarantee
  • 99.9% Uptime Guarantee
  • Unlimited Email accounts
  • Unlimited MySQL Databases
  • FREE Domain Name

TELL ME MORE

Follow Us