{"id":6241,"date":"2016-09-08T07:17:17","date_gmt":"2016-09-07T23:17:17","guid":{"rendered":"http:\/\/rmohan.com\/?p=6241"},"modified":"2016-09-08T07:17:17","modified_gmt":"2016-09-07T23:17:17","slug":"update-your-linux-kernel-from-3-1-to-4-7-2-1","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6241","title":{"rendered":"update your Linux kernel from 3.1 to 4.7.2-1"},"content":{"rendered":"<header class=\"entry-header\">\n<h1 class=\"entry-title\">Update Your Linux Kernel in Place (Running CentOS 7 or Above)<\/h1>\n<\/header>\n<div class=\"entry-content\">\n<p>If you started an instance from the official CentOS AMI on AWS,\u00a0you are running kernel 3.1 as of this writing, while you could easily take advantage of improved security features of newer kernels that are already\u00a0available in a stable release. Here is how to update your Linux kernel from 3.1 to 4.7.2-1 in place.<\/p>\n<h4>Step 1. Import the repo key<\/h4>\n<p>Import the GPG key for the repository:<\/p>\n<pre>rpm --import https:\/\/www.elrepo.org\/RPM-GPG-KEY-elrepo.org<\/pre>\n<h4>Step 2. Install the repository<\/h4>\n<p>Install the repository that holds your new kernel:<\/p>\n<pre>yum install http:\/\/www.elrepo.org\/elrepo-release-7.0-2.el7.elrepo.noarch.rpm<\/pre>\n<p>You can peek inside the configuration file for the repository to see what it will be doing:<\/p>\n<pre>nano \/etc\/yum.repos.d\/elrepo.repo<\/pre>\n<h4>Step 3. Enable the repository<\/h4>\n<p>Enable the repository with this command:<\/p>\n<pre>yum --enablerepo=elrepo-kernel install kernel-ml<\/pre>\n<h4>Step 4. Install the RPM<\/h4>\n<p>Install your new\u00a0kernel for CentOS\/RHEL 7.02:<\/p>\n<pre>yum install http:\/\/www.elrepo.org\/elrepo-release-7.0-2.el7.elrepo.noarch.rpm<\/pre>\n<h4>Step 5. List all available kernels<\/h4>\n<p>List all kernels that are available to the grub bootloader on your system:<\/p>\n<pre>awk -F\\' '$1==\"menuentry \" {print $2}' \/etc\/grub2.cfg<\/pre>\n<h4>Step 6. Select the new kernel<\/h4>\n<p>From the list of available kernels, select the new kernel:<\/p>\n<pre>grub2-set-default 0<\/pre>\n<p>The number 0 denotes the first kernel in the list.<\/p>\n<h4>Step 7.\u00a0Save the new configuration and reboot<\/h4>\n<p>Save your new configuration:<\/p>\n<pre>grub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p> Update Your Linux Kernel in Place (Running CentOS 7 or Above) <\/p>\n<p>If you started an instance from the official CentOS AMI on AWS, you are running kernel 3.1 as of this writing, while you could easily take advantage of improved security features of newer kernels that are already available in a stable release. Here [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6241"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6241"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6241\/revisions"}],"predecessor-version":[{"id":6242,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6241\/revisions\/6242"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}