linux的内核升级

  • A+
所属分类:运维教程

linux的内核,也就是kernel,负责操作系统与硬件的沟通。简单来说,它就是一个翻译官,将操作系统语言翻译成设备语言,使其在硬件中执行;并将设备语言翻译成操作系统的语言,返回执行结果。所以我们说kernel版本越高,功能会越强大。

今天我们就来学习一下,如何升级我们的kernel。

首先我们需要查看一下当前系统kernel的版本。

可通过命令uname -r。下图为执行后效果:

linux的内核升级

知道版本之后,我们就可以升级了。当然我们先要下载升级文件。

升级文件分为两种,第一种rpm安装包,第二种源码安装包。前者安装更为简单方便,通过命令:

rpm -ivh newkernel.rpm

安装即可。

下面我们详细讲解一下源码包形式的安装。

下载文件。我们已将安装文件下载到桌面上,这些文件都可以在互联网中找到,这里就不放下载地址了。需要注意的是,所找的版本一定要比当前版本高,不然就不叫升级了:

linux的内核升级

解压、进入目录、查看文件:

linux的内核升级

在编译安装前,记得先装好gcc,这里就不给大家演示了。然后使用命令:

make menuconfig

开始编译,但是会出现下面的错误:

linux的内核升级

解决这个问题十分简单,原因是缺少个工具,使用yum命令安装就行了,命令如下:

yum -y install ncurses-devel

安装后再编译,就会进入到下面的界面:

linux的内核升级

如果没有成功,是因为终端窗口分辨率问题,将其最大化就行了。

在上图中设置要开启的功能,我们这里使用默认设置。如何设置?都有什么功能?可以自行百度,或者在此页中留言。

linux的内核升级

选择yes保存新kernel设置项,然后依次执行如下命令:

make CONFIG_DEBUG_SECTION_MISMATCH=y
make modules
make modules_install
make install

编译安装时间很长,根据cpu数量和处理速度不同,时间大约20分钟到一个小时。

安装成功之后,我们可以查看下grub.conf,会发现新kernel已经出现在配置文件中了,重启后即可选择新的kernel引导系统。至此,kernel升级完成了。linux的内核升级

  • 问答中心
  • 微信小程序扫一扫
  • weinxin
  • 微信公众
  • 微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:28   其中:访客  28   博主  0

    • avatar Digital Marketing Agency

      Leading Digital Marketing agency in India and Kolkata, Leading Web Design company. Providing web designing and Digital marketing services, Digital marketing course, and certification with an internship.

      • avatar Click here

        You could certainly see your expertise within the work you write. The arena hopes for even more passionate writers like you who are not afraid to mention how they believe. At all times follow your heart.

        • avatar see it here

          F*ckin¦ awesome issues here. I am very satisfied to look your article. Thank you a lot and i am taking a look ahead to touch you. Will you please drop me a e-mail?

          • avatar Investments

            A fascinating discussion is definitely worth comment. I do believe that you need to publish more about this issue, it may not be a taboo matter but generally folks don’t talk about these subjects. To the next! All the best!!

            • avatar Online Pharmacy

              Leading Online Pharmacy – Contact us at +1 (917) 259-3352 for unbelievable rates, discount and offers on any medicine. Get it delivered free of cost at your door steps, call us today. Phone : +1 (917) 259-3352

              • avatar Certified Public Accountant Near Me

                Hi there! I could have sworn I’ve been to this blog before but after going through a few of the articles I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be bookmarking it and checking back regularly!

                • avatar grolyrtolemcs

                  I was very happy to search out this internet-site.I needed to thanks in your time for this excellent read!! I definitely having fun with each little little bit of it and I have you bookmarked to take a look at new stuff you weblog post.

                  • avatar cbd oil that works 2020

                    My family always say that I am killing my time here at web, however I know
                    I am getting familiarity all the time by reading thes good posts.