How do I install PHP 5.3 on CentOS?

Posted by fivelitresofsoda on Server Fault See other posts from Server Fault or by fivelitresofsoda
Published on 2011-01-11T19:59:52Z Indexed on 2012/11/11 5:05 UTC
Read the original article Hit count: 495

Filed under:
|
|

I have to install PHP 5.3 on my CentOS server. If I do yum install php, the base repository installs 5.1.6 which is too old for the applications I need to install. So I've been trying to use the IUS repository, following the official instructions from IUS:

root@linuxbox ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1-2.ius.el5.noarch.rpm

root@linuxbox ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-1-1.ius.el5.noarch.rpm

root@linuxbox ~]# rpm -Uvh ius-release*.rpm epel-release*.rpm

OK. Now I simply do yum install php53, etc. for all I need... but I get this error:

Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
  file /usr/bin/php from install of php53u-cli-5.3.4-3.ius.el5.x86_64 conflicts with file from package php-cli-5.1.6-27.el5_5.3.x86_64
  file /usr/bin/php-cgi from install of php53u-cli-5.3.4-3.ius.el5.x86_64 conflicts with file from package php-cli-5.1.6-27.el5_5.3.x86_64
  file /usr/share/man/man1/php.1.gz from install of php53u-cli-5.3.4-3.ius.el5.x86_64 conflicts with file from package php-cli-5.1.6-27.el5_5.3.x86_64
  file /etc/php.ini from install of php53u-common-5.3.4-3.ius.el5.x86_64 conflicts with file from package php-common-5.1.6-27.el5_5.3.x86_64

Error Summary
-------------

I have no idea on how to solve this. I think I have to delete the base packages. However, as someone new to Linux, I don't know how to do that.

© Server Fault or respective owner

Related posts about apache2

Related posts about php