Skip to content

Installing PHP 5.3 on CentOS 5.7

The assumption for installing PHP 5.3 on CentOS 5.7 tutorial is that you are running as root and have a basic understanding of the software required but if you follow this tutorial you should be able to complete the task successfully.

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.3 on CentOS 5.7 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
# yum install php53u php53u-common php53u-devel
# php -v
PHP 5.3.8 (cli) (built: Aug 23 2011 06:33:32)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

Installing PHP 5.3 on CentOS 5.7 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
# yum install php53u php53u-common php53u-devel
# php -v
PHP 5.3.8 (cli) (built: Aug 23 2011 06:33:32)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies