CentOS Logo

Installing PHP 5.4 on CentOS 5.8

This tutorial is intended for system administrators wanting to install PHP 5.4 on CentOS 5.8

The reader should know how to configure a web server or application server and have basic knowledge of the HTTP protocol. Once finished the reader should have PHP 5.4 running with the default configuration.

Install Yum Priorities

For a brief overview on and how to configure Yum Priorities you can follow the instructions outlined in our Install YUM Priorities on CentOS tutorial.

# yum install yum-priorities

Installing PHP 5.4 on CentOS 5.8 x86_64

Install the EPEL x86_64 YUM Repository

# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

Install the IUS x86_64 YUM Repository

# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm

Installing PHP 5.4 on CentOS 5.8 i386

Install the EPEL i386 YUM Repository

# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Install the IUS i386 YUM Repository

# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm

Published by

George Rushby

Technical Samurai specializing in open source IT Automation and Cloud Infrastructure.

  • http://www.facebook.com/profile.php?id=100000057418467 Paul Aan

    Great job friend… I have spent 2hours to before read this article.

  • Intasar Khan

    Thanks George,

    can you please also guide that how we configure IUS and Epel in order to get latest versions of packages ? like we configure priority inn another article

  • Intasar Khan

    also its showing this

    warning: rpmts_HdrFromFdno: Header V4 DSA signature: NOKEY, key ID 9cd4953f
    ius/gpgkey | 1.3 kB 00:00
    Importing GPG key 0x9CD4953F “IUS Community Project ” from /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
    Is this ok [y/N]: y
    warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
    epel/gpgkey | 1.7 kB 00:00
    Importing GPG key 0x217521F6 “Fedora EPEL ” from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
    Is this ok [y/N]:

    SHould i write Yes ? i use centos i386 32 bit 5.8 final

  • Victor Gomes

    Nice article, thanks it helps me a lot.