I'd say uninstall CentOS and install Ubuntu, if that's what you want to use. But it must be an older version of CentOS you use. CentOS 6.2 uses PHP 5.3 and MySQL 5.1.
You can use Remi repository to get newer versions of Apache/PHP/MySQL
And you don't make your CentOS machine work more like Ubuntu, because it is not Ubuntu. It's like saying "How do I make my Chrysler drive more like a Ford".
Updated response:
I got some down votes on this, so I think my intentions has been misunderstood, let me try to correct that.
I have set up a VPS in our environment and installed the packages, so I should be where you are at right now:
[root@centos5 /]# cat /etc/issue
CentOS release 5.7 (Final)
Kernel \r on an \m
[root@centos5 /]# rpm -qa |grep php
php-common-5.1.6-27.el5_7.4
php-mysql-5.1.6-27.el5_7.4
php-cli-5.1.6-27.el5_7.4
php-pdo-5.1.6-27.el5_7.4
php-5.1.6-27.el5_7.4
In my first response, I assumed you wanted the latest releases, then you should use the Remi repository as I have stated above. However, if the PHP 5.3 version within centOS is fine (5.3.3) then read on.
When trying to install php53 it complains that there is a conflict, since this package will cover the same things as the PHP 5.1 package. To solve this you need to remove all PHP related packages to begin with:
[root@centos5 /]# yum remove php*
[root@centos5 /]# rpm -qa |grep php
[root@centos5 /]#
Next thing you do is to install the equivalent packages with php53:
[root@centos5 /]# yum install php53 php53-cli php53-mysql
[root@centos5 /]# rpm -qa |grep php
php53-common-5.3.3-1.el5_7.5
php53-cli-5.3.3-1.el5_7.5
php53-pdo-5.3.3-1.el5_7.5
php53-5.3.3-1.el5_7.5
php53-mysql-5.3.3-1.el5_7.5
So, PHP was quite easy. But MySQL is another story, since MySQL 5.0 is the only MySQL in the default CentOS repositories. I run the 64 bit version of CentOS, if you do not you need adjust the following to fit 32 bit instead.
There are several ways of doing this but I'm gonna go with the Remi repository. It's been around for years and maintaining is easier with a repo than using plain RPM files.
Remi requires the EPEL repository so start by installing that:
[root@centos5 /]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
warning: /var/tmp/rpm-xfer.lvLBMJ: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
Next, you install the Remi repo RPM
[root@centos5 /]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
warning: /var/tmp/rpm-xfer.ztjinG: Header V3 DSA signature: NOKEY, key ID 00f97f56
Preparing... ########################################### [100%]
1:remi-release ########################################### [100%]
Next you remove the current MySQL server (otherwise you will get conflicts when trying to install the new one).. NOTE! If you have databases on there, make a backup before doing this!
[root@centos5 /]# yum remove mysql*
Then you can go on and install the MySQL from the Remi repository:
[root@centos5 /]# yum --enablerepo=remi install mysql.x86_64 mysql-server.x86_64
Now when you try to start MySQL it may fail because the old mysql left some things behind, and this can be kind of painful to get rid of. In my case here I needed to remove some things to get it working. These did it for me:
# rm -rf /usr/share/mysql
# rm -rf /var/lib/mysql
# yum --enablerepo=remi reinstall mysql-libs
# /usr/libexec/mysqld --skip-grant &
# mysql_install_db
# /etc/init.d/mysqld stop
# /etc/init.d/mysqld start
PHP5.5
webtatic.com/packages/php55