I'm working on a fresh CentOS server and am extremely annoyed to find out that yum does not work as smoothly and brilliantly as "apt-get install" does on Ubuntu.
Installing a LAMP stack, I ran the following:
$ yum install php
$ yum install mysql
Furthermore:
$ yum install mysql-server
$ yum install mysql-devel
$ yum install php-mysql
Now running:
$ rpm -qa | grep php
…shows that I have all kinds of php 5.1.6 packages installed and I need 5.2 minimum.
In addition, I see that it installed mysql 5.0.77, even though the current release is 5.5.20. But hopefully mysql 5.0 will work. PHP 5.1 will not.
So the real question(s) is(are):
How do I fix my PHP to make it the latest stable release (5.3.9 according to PHP.net)?
How do I make my CentOS machine work more like Ubuntu so I don't have to deal with this again?
Thanks very much.
EDIT:
CentOS 5.7 was installed by a hosting company last week, so I don't know why they would have installed an older version of CentOS, rather than the most recent.
I need PHP 3.2 at least, so I appreciate the suggestions on how to do that.
I'm not very familiar with packages and repositories, but it appears that anyone can start a repository and so I'm concerned about installing things from some random repository that could infect the server.
Best Answer
CentOS is a DERIVATIVE of the very conservative Red Hat Enterprise Linux, so package updates will generally be delayed even further than RHEL. Packages in either distribution are going to be a little older.
If you're running CentOS 5, you ought to try CentOS 6 to see if it suits your needs.
If you need something a little more cutting-edge than CentOS 6, you should look into Fedora.
Follow-up: CentOS has been brought "in-house", and is more tightly integrated. Newer CentOS releases will see the benefits of a tighter release cycle, but for older releases this answer will still hold true.