In CentOS 6.x, how can I upgrade to Kernel 3.4?

Solution 1:

This action goes against the purpose of Red Hat Enterprise Linux (and thus, CentOS). These enterprise distributions are meant to maintain stable minor versions of the kernel and core packages (glibc, gcc, etc.) in order to provide a stable platform throughout the supported lifecycle of the distribution.

That means that installing a much newer kernel would turn your system into something other than CentOS.

That said, it can definitely be done. The link you posted is a good guide. You should also upgrade to CentOS 6.3 while you're in the process. (6.4 is on the way)

Following your compilation, you should select the newly-compiled kernel at the CentOS boot screen or change the default booting kernel via the default= line in /etc/grub.conf.

Solution 2:

If you really must, you can get newer kernels from ElRepo but once you do this you're on your own so to speak. You will be outside of the normal EL support channels and may not be able to get security and bug fixes etc.

Solution 3:

When you say "CentOS 6.2 with kernel version 2.6.32" you aren't being entirely accurate:

...there is no one [kernel version] number that accurately represents the RHEL 6 kernel. We take what is upstream; if there are pieces that are not mature, we disable them so they don't disrupt things; and there are some technology pieces that are further ahead that we pull in...

As others have said, changing the kernel goes against the grain of using CentOS/RHEL/OEL etc, but the above also means that by upgrading to 6.3, although you don't change the apparent kernel version you do upgrade the kernel—it's just not possible to do a like-for-like comparison with mainline kernel numbers.