linux - 更新内核版本 - Centos 7

标签 linux amazon-web-services linux-kernel centos

<分区>

我想将内核更新到最新版本或至少 kernel-3.10.0-514.13.1.el7 。当前它在 aws 服务器中显示以下内核版本。使用linux centos 7。

要更新内核版本至少kernel-3.10.0-514.13.1.el7

“yum -y update kernel”会更新到最新的内核 >=kernel-3.10.0-514.13.1.el7 吗?

uname -sr
Linux 3.10.0-327.28.2.el7.x86_64

cat /etc/*release
CentOS Linux release 7.2.1511 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

最佳答案

如果您愿意/想使用“当前”内核,那么您可以启用 elrepo 并安装 kernel-ml

检查您的 /etc/yum.repos.d/elrepo.repo - 如果您没有,请查看; http://elrepo.org/tiki/tiki-index.php这将为您提供有关如何添加和启用企业 linux 存储库以及启用内核部分的说明。

然后,如果需要,您应该可以一直升级到 4.11.1。 kernel-ml 安装与旧的 kernel-x 文件兼容,可以在系统中共存。 Kernel-ml 也有固件、头文件和库文件。

yum info kernel-ml

Name        : kernel-ml
Arch        : x86_64
Version     : 4.11.1
Release     : 1.el6.elrepo
Size        : 184 M
Repo        : installed
From repo   : elrepo-kernel
Summary     : The Linux kernel. (The core of any Linux-based operating system.)
URL         : https://www.kernel.org/
License     : GPLv2
Description : This package provides the Linux kernel (vmlinuz), the core of any
            : Linux-based operating system. The kernel handles the basic functions
            : of the OS: memory allocation, process allocation, device I/O, etc.

安装新内核后,您需要检查 grub.conf 文件,该文件告诉操作系统从哪个内核(如果安装了多个内核)启动。该文件应位于; /etc/grub.conf 文件顶部的某处应该是 default=x 行,其中 x 通常是 01 在其下方您可能有一个内核列表。列表中的第一个通常是最新的并且是 0 然后他们在列表中编号。

示例 grub.conf 启动内核 4.11.1-1;

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (4.11.1-1.el6.elrepo.x86_64)
        root (hd0,0)
        kernel /vmlinuz-4.11.1-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_xs-lv_root rd_NO_LUKS rd_LVM_LV=vg_xs/lv_swap LANG=en_US.UTF-8 rd_NO_MD SYSFONT=la
tarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=uk rd_LVM_LV=vg_xs/lv_root rd_NO_DM audit=0
        initrd /initramfs-4.11.1-1.el6.elrepo.x86_64.img
title CentOS (4.11.0-1.el6.elrepo.x86_64)
        root (hd0,0)
        kernel /vmlinuz-4.11.0-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_xs-lv_root rd_NO_LUKS rd_LVM_LV=vg_xs/lv_swap LANG=en_US.UTF-8 rd_NO_MD SYSFONT=la
tarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=uk rd_LVM_LV=vg_xs/lv_root rd_NO_DM audit=0
        initrd /initramfs-4.11.0-1.el6.elrepo.x86_64.img

关于linux - 更新内核版本 - Centos 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44061068/

相关文章:

linux - AMI 上的 AWS EC2 apache 日志文件位置

linux - 使用 "node server &"运行 Node 服务器

amazon-web-services - 从 AWS CLI 查找服务器上正在使用的角色

amazon-web-services - AWS - Cognito 联合身份

memory-management - Linux内核中的内存映射

linux - printk() 打印到哪里?

在 c (gcc) centos 7 中实现的 unix 域套接字中的连接错误

linux - 尝试在 Linux 上打开文件时,MARS MIPS 模拟器卡住

file - 将近 40 万张图像传输到 S3 的最有效方法

linux - 套接字选项在 Linux 中是本地的吗?