Kernel CentOS, cPanel & Fedora Update
Posted by Will Kruss on 31 May 2016 04:26 PM
|
|
This guide provides instruction to check your server kernel information & upgrade your server to latest kernel. Read & learn. To update the kernel in CentOS, cPanel or Fedora is very simple. However, there are a few tricks to ensure you don't run into trouble. Note: This article applies to CentOS 6 and cPanel servers. Clients with CentOS 7 installed should read this article. 1. Set a maximum number of installed kernels This ensure you will not run out of disk space in the /boot partition by continually adding new kernels.
2. Update the kernel On most VPSes there is a symbolic link created as: /etc/grub.conf -> /boot/grub/grub.conf and there is no need to update grub config manually. To check if there is symbolic link type the command: ls -la /etc/grub.conf If the output is as below:
Don't worry about the date, as long as it points to the /boot/grub/grub.conf then the symlink is in place correct you are ok. If the symlink does not exist you can either email support and have us check and update the kernel for you. Or type the following commands:
Now all is prepared to update the kernel:
It will display something similar to this:
Single Commands to set number of kernels and install the latest kernel: [ ! -h /etc/grub.conf ] && mv -f /etc/grub.conf /boot/grub/grub.conf && ln -s /boot/grub/grub.conf /etc/grub.conf yum install yum-utils -y && package-cleanup --oldkernels --count=2 -y && sed -i 's/installonly_limit=.*/installonly_limit=2/g' /etc/yum.conf && yum clean all && yum update -y Reboot your server:
| |
|