We are using Zend Framework and in version 2, php 5.2 will be the minimum requirement. We love CentOS and we'd like to keep using it, but PHP 5.1 just won't do anymore when developing web applications with Zend framework.
I found several links to solutions to upgrade with external repositories.
Recommended method to upgrade PHP 5.1.6 to 5.2.x on CentOS 5.4
http://www.webtatic.com/blog/2009/05/installing-php-526-on-centos-5/
http://www.webtatic.com/blog/2009/06/php-530-on-centos-5/
We'd like to see another solution with the use of an "official?" CentOS repository if any is available.
We only need to upgrade PHP, the rest of the CentOS setup is fine the way it is. For us, it's important however to keep the YUM cycle intact using the normal repositories.
So in short: is it even possible to upgrade only PHP by using an external repo or otherwise? While still upgrading all our other packages safely through normal yum usage?
Thanks for your help!
I wish I would have seen this question when it was asked. You should be very selective which 3rd party repos you install packages from. Many do not follow packaging best practices and most do not ensure non-conflicting package names. You can easily make a giant mess of your system. I gave the following answer in response to this more recent question.
I highly suggest using the IUS Community Project repositories for upgrading your PHP 5.2, and even PHP 5.3 packages on CentOS 5. These are a set of very well maintained and high quality packages, used by Rackspace and maintained, but not supported by them (unless you're a customer of course).
The install instructions can be a little hard to find if you're new to this. You're looking for the client usage guide on their wiki. I will duplicate the instructions here for ease of use.
This downloads and installs both the EPEL and IUS repos for you.
IUS promises not to use conflicting package names with any of the official repos, including EPEL (this is a great thing), things aren't as simple as
yum upgrade php
. You will need to first uninstall all of your existing PHP packages, and install the appropriate ones from IUS. Alternatively, you can use theyum-plugin-replace
plugin to add a useful "replace" capability to YUM.Manually
First:
rpm -qa | grep php
lists each installed PHP package. You will use this list to install all the appropriate individual PHP packages from IUSyum erase php
command just erases PHP and it's dependent packagesFinally:
yum search php52
lists the available PHP 5.2 packagesyum install
installs your chosen PHP 5.2 packages. You would use the list you obtained in step one to determine which you neededyum-plugin-replace
This will magically determine which PHP packages to erase, and which matching php52 packages to install for you.
The excellent Remi has the very latest PHP builds for legacy distros - I upgraded Fedora 6 to PHP 5.3 recently. Once you have installed the key as above, you can install PHP 5.3.1 like so:
This will not affect normal upgrade/installation from standard repos, as "remi" is a separate repo and not active except for during this single request.
there're many personal repo for php. just make sure you trust the person managing the repo. also, make sure the person do manage the repo instead of build once and forget about it...
here're alternate ways:
A. atomic repo: http://www.atomicorp.com/wiki/index.php/PHP
B. centos dev/testing repo:
There is many way to do it.
The official way to upgrade to a latest version would be the CentOS Developpement repository available at : http://dev.centos.org/centos/5/testing/x86_64/RPMS or by compiling it.
If you absolutely need 5.3 installed by YUM, you will need to go with unsupported repository. The best YUM repository known to me are the following :
RPMForge
ART (Atomic Rocket Turtle)
There is tons of other one maintained by one or two persons that you will find around. Just make sure you only update the php packages.
I'm using The Zend Server Community Edition. It has a YUM repository: http://files.zend.com/help/Zend-Server/rpm_installation.htm