There are some issues with php-common when installing php 5.3 on a server with php 5.1* on it already. I have gotten it down to a science pretty much from playing with installations. Its actually really easy to do. I will update this if I find a quicker way to do this.
- Start with a fresh linux install.
- Remove php. <—– Only if you have 5.3* installed already.
- Install Virtualmin
- Check php version.
- Remove php and install php53.
First start with your fresh Linux install to prevent issues with completing the install. Then check which php version you have by typing:
php -v
You will most likely have php 5.3+ installed already so we need to remove php before running the VM install or it will fail. You can remove php by typing:
yum remove php-*
Now its time to run the install script of Virtualmin that you have downloaded. If you dont have it you can type this.
wget http://software.virtualmin.com/gpl/scripts/install.sh
Then install VM.
sh install sh
This will complete your install of VM and it will fail at the end when it tries to update to php53. Now you need to remove the php that it installed(5.1.6) and then install php53.
yum remove php-*
Now install php53:
yum install php53-*
php -v
Thats it! You should have successfully upgraded to php 5.3.3. 🙂
ADDITIONAL INFO:
The php53 package is missing php53-mcrypt so if you need mcrypt, now is the time to install it. You need to get the remi.repo and the epel.repo to get mcrypt. I have done the work already for you so here it is:
wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
Now its time to install mcrypt:
yum –enablerepo=remi install php53-mcrypt
Thats it! Mcrypt is now installed. :)Check /etc/yum.repos.d/ and make sure that epel and remi repos are not enabled. They should say “ENABLE=0” or else you can mess up the install. VM has their own repos.
Let me know if you have any issues!
Or just do what I did and install webtatic repo.
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum –enablerepo=webtatic update php
done!
Things must have changed since I created this 🙂