How to install PHP 5.3 on CentOS

add new repositories to your system :

[shell]
# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-6.ius.el5.noarch.rpm
[/shell]

you'll need to remove PHP and it's associated friends :

[shell]
# yum erase php php-pear php-mysql php-cli php-common
[/shell]

you can go ahead and install PHP 5.3 :

[shell]
# yum install php53u php53u-pear php53u-cli php53u-common php53u-gd
# yum install php53u-mbstring php53u-mcrypt php53u-mysql php53u-soap
# yum install php53u-xml php53u-xmlrpc php53u-bcmath

[/shell]

If you'd prefer to install 5.2 :

[shell]

# yum install php52 php52-pear php52-cli php52-common php52-gd
# yum install php52-mbstring php52-mcrypt php52-mysql php52-soap
# yum install php52-xml php52-xmlrpc php52-bcmath

[/shell]

Comments