Update CentOS kernel to latest CentOS Plus

Use the following command to check your current Kernel version

root@server [~]# uname -r
2.6.18-348.6.1.el5

In order to update CentOS to CentOS Plus Kernel you would need to do the following:

First edit the your yum configuration repo for CentOS in [centos] section as   following:

[root@server ~]# vi /etc/yum.repos.d/CentOS-Base.repo

[centosplus]
enabled=1
includepkgs=kernel*

Verify the changes as following:

root@server [~]# cat /etc/yum.repos.d/CentOS-Base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
includepkgs=kernel*
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

root@server [~]# yum update kernel

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.netnitco.net
* centosplus: centos.netnitco.net
* extras: centos.netnitco.net
* updates: centos.netnitco.net
base                                                                                                  | 1.1 kB     00:00
centosplus                                                                                            | 1.9 kB     00:00
centosplus/primary_db                                                                                 |  67 kB     00:00
extras                                                                                                | 2.1 kB     00:00
updates                                                                                               | 1.9 kB     00:00
Excluding Packages in global exclude list
Finished
Reducing CentOS-5 - Plus to included packages only
Finished
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package kernel.x86_64 0:2.6.18-348.6.1.el5.centos.plus set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================
Package               Arch                  Version                                         Repository                 Size
==========================================================
Installing:
kernel                x86_64                2.6.18-348.6.1.el5.centos.plus                  centosplus                 24 M

Transaction Summary
==========================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 24 M
Is this ok [y/N]: y
Downloading Packages:
kernel-2.6.18-348.6.1.el5.centos.plus.x86_64.rpm                                                      |  24 MB     00:07
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : kernel                                                                                                1/1

Installed:
  kernel.x86_64 0:2.6.18-348.6.1.el5.centos.plus
Complete!

Reboot the server to load the server with latest kernel.

Make sure that you have default=0 in /etc/grub.conf which will load the newer version of kernel after reboot.

 

Get Free cPanel Knowledge Base

Thank you for subscribing.

Something went wrong.

5.00 avg. rating (96% score) - 1 vote