How to update CentOS 6 kernel to version 3 or 4 from default CentOS 2.6 kernel.
Please read this article before doing any changes on your server.

Install repository having new kernels

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
sed -i "s/enabled=1/enabled=0/g" /etc/yum.repos.d/elrepo.repo

To install kernel 4

yum --enablerepo=elrepo-kernel install kernel-ml  

To install kernel 3

yum --enablerepo=elrepo-kernel install kernel-lt  

Now lets activate our newly installed kernel.
Edit File /etc/grub.conf and set "default=" to your new kernel, this will be probably the 0.

You can count each line starting with kernel as one number starting from 0, so the first kernel will be 0 and others +1.
Latest installed kernel version starts from the top.

Example:
"kernel /vmlinuz-4.3.3-1.el6.elrepo.x86_64" will be default 0
"kernel /vmlinuz-2.6.32-573.12.1.el6.x86_64" will be default 1
"kernel /vmlinuz-2.6.32-504.el6.x86_64" will be default 2

Once you have changed the /etc/grub.conf kernel boot configuration, you need to reboot the server.
When server comes back, you can check the kernel version by using command:

uname -a

Please note that this custom kernel versions are NOT default in Centos 6 system and that this could cause some issues with the compatibility of server services.

We don't recommend this installations, but in some cases it's need as kernel 4 has much more performances for handling high traffic servers.

If you have a VPS server like openVZ then you can't do a kernel update, that would need to be done by your server provider.

If you need a help, you can always check our support services.