I wanted to upgrade to the latest version of PHP on a VirtualMin server I manage for a client and I found some answers.  I thought I’d post the exact process here for your reading pleasure.  By the way, this seems to only be the CentOS or Red Hat Linux process so the Ubuntu fans are out of luck.  I tried VirtualMin on Ubuntu (my preferred OS) but it didn’t do well and with CentOS it was ROCK solid.  I’d recommend CentOS to anyone wanting to use VirtualMin…just my preference and recommendation here.

References:  Documentation on bleeding edge packages & A VirtualMin Message Board Post

Get to a command prompt on your server with root access and run these commands:

  1. First, automatically configure yum to use these repositories on VirtualMin: rpm -ivh http://software.virtualmin.com/bleed/centos/5/i386/virtualmin-bleed-release-1.0-1.rhel.noarch.rpm
  2. yum update php
  3. Yes <– Prompt that you want to download and install
  4. php -v PHP
  5. Will show you your current version of PHP, mine was:
    • 5.2.17 (cli) (built: Jan 16 2011 22:13:08) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
  6. Restart Apache, I logged into the web gui for this because I can’t remember the /usr/sbin/blahblahblah command to restart Apache so do step 7 :p
  7. System Information > Status > Actions click “Restart Apache”, looks like double arrows