2017-05-19 141 views
-1

我想將內核更新到最新版本或至少kernel-3.10.0-514.13.1.el7。目前它顯示aws服務器中的以下內核版本。使用Linux CentOS的7更新內核版本 - Centos 7

要更新的內核版本ATLEAST內核3.10.0-514.13.1.el7

志「百勝-y更新內核」更新到最新的內核> =內核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" 
+0

任何人都可以幫我嗎? – Arav

回答

0

是的,該命令將更新內核及其所有依賴關係。但是,更新內核只是操作系統的一部分,建議您使用yum update更新整個系統,除非您對某些軟件包版本有特定需求。我總是捨棄-y選項,以便我可以查看正在更新/安裝的內容。

+0

謝謝。很多信息 – Arav

0

如果你很高興/要使用的「當前」的內核,那麼你可以啓用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文件,它告訴OS的內核(如果你有幾個安裝)從啓動。該文件應位於; /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 
+0

非常感謝您的信息。 yum安裝kernel-ml之後,系統是否會在重新啓動後自動指向新內核? – Arav

+0

對不起,所以只看到了這一點 - 我已經更新了我的答案和額外的信息,關於如何檢查你已經安裝了哪些版本,以及如何更改啓動哪個版本。根據系統的設置方式,它將啓動最新的內核或最後一個內核 - 參見上文,它將告訴您如何檢查/更改。 – user3788685

+0

你有沒有設法測試/得到這個工作? – user3788685