CentOS: Upgrading CentOS Release 6.0 to 6.2

The best server maintenance practice is to have all software run up-to-date by following the latest stable release. Most of our servers are has been upgraded to CentOS 6 from CentOS 5 (major release), but also need to upgrade from CentOS 6.0 to CentOS 6.2 (minor release) which usually comes by every about 4 to 8 weeks after upstream release (RedHat).

It just a simple step by the way and variables as below:

OS: CentOS 6.0 64bit
Current release:  CentOS 6.2

1. Check our current kernel and release version:

$ uname -a
Linux centos.local 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/centos-release
CentOS Linux release 6.0 (Final)

2. Before upgrade, it is recommended to clean all cached files from any enabled repository:

$ yum clean all

3. Lets start upgrading. It takes some time depending on your connectivity to CentOS repository:

$ yum update

4. Once completed, proceed to reboot:

$ init 6

5. Check our latest kernel and release version:

$uname -a
Linux centos.local 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/centos-release
 CentOS release 6.2 (Final)

To automate this process, we can repeat this process bi-monthly to make sure our operating system is up-to-date with the current release. Run crontab -e and add following line:

0 0 */14 * * yum clean all; yum update

Dont forget to restart crond:

$ service crond restart