Linux内核4.4.5 LTS发布 - 在CentOS 7和Ubuntu 15.10中安装它

时间:2020-03-21 11:45:31  来源:igfitidea点击:

在本教程中,让我们了解如何在CentOS 7和Ubuntu 15.10中安装Linux内核4.4.5 LTS版本。

在CentOS中安装Linux内核4.4.5 LTS

我在CentOS 7 64位版本上测试了本教程。
虽然,这些步骤应该在RHEL 7上工作。

注意:由于此内核刚刚发布,最新内核尚未推入Elrepo。
它仍然显示4.4.4版本。
我认为最新的内核将在几个小时内被推到存储库。

要安装最新的内核,请添加elrepo存储库。

添加Elrepo GPG键:

# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

然后,使用命令在CentOS 7/Rhel 7/Scientific Linux 7中添加Elrepo:

# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

要为CentOS 6/Rhel 6/Scientific Linux 6安装Elrepo:

# rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

要为CentOS 5/Rhel 5/Scientific Linux 6安装Elrepo:

# rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm

通过安装以下包来使用Elrepo最快的镜像:

# yum install yum-plugin-fastestmirror

示例输出:

================================================================================
 Package Arch Version Repository
 Size
================================================================================
Updating:
 yum-plugin-fastestmirror noarch 1.1.31-34.el7 base 30 k
Transaction Summary
================================================================================
Upgrade 1 Package
Total download size: 30 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm | 30 kB 00:00 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
 Updating : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 1/2 
 Cleanup : yum-plugin-fastestmirror-1.1.31-25.el7_0.noarch 2/2 
 Verifying : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 1/2 
 Verifying : yum-plugin-fastestmirror-1.1.31-25.el7_0.noarch 2/2
Updated:
 yum-plugin-fastestmirror.noarch 0:1.1.31-34.el7
Complete!

我们已经添加了Elrepo。
现在,是时候安装Linux内核4.4.1 LTS了。

让我们了解使用命令的当前版本详细信息:

# uname -r

示例输出:

3.10.0-123.9.3.el7.x86_64

如我们所见,已安装的版本为3.10.0-123.9.3.el7.x86_64.

使用命令安装Linux内核4.4.1 LT:

# yum --enablerepo=elrepo-kernel install kernel-ml

示例输出:

Dependencies Resolved
================================================================================
 Package Arch Version Repository Size
================================================================================
Installing:
 kernel-ml x86_64 4.4.4-1.el7.elrepo elrepo-kernel 38 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 38 M
Installed size: 170 M
Is this ok [y/d/N]: y
Downloading packages:
kernel-ml-4.4.4-1.el7.elrepo.x86_64.rpm | 38 MB 02:28 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
 Installing : kernel-ml-4.4.4-1.el7.elrepo.x86_64 1/1 
 Verifying : kernel-ml-4.4.4-1.el7.elrepo.x86_64 1/1
Installed:
 kernel-ml.x86_64 0:4.4.4-1.el7.elrepo
Complete!

安装内核后,重新启动系统并从GRUB启动菜单中选择最新内核。

使用命令查看内核版本:

# uname -r

示例输出:

4.4.4-1.el7.elrepo.x86_64

祝贺!CentOS 7系统目前正在内核4.4.4上运行。

安装Linux内核后4.4.x后有任何问题?
不用担心,重新启动系统。
从引导菜单中选择以前工作的内核。

然后,使用命令删除新安装的内核:

# yum remove kernel-ml

在Ubuntu 15.10中安装Linux内核4.4.5 LTS

我在Ubuntu 15.10服务器中测试了本教程。
但是,本教程应在较旧的Ubuntu版本,Debian和Linux Mint等上工作。

使用命令检查当前的Linux内核版本:

$uname -r

示例输出:

4.2.0-16-generic

如我们所见,我的Ubuntu 14.04系统有4.2.0-16通用内核版本。

现在,我们将安装Linux内核4.4.5.
我们可以从以下链接下载最新内核。

  • 下载Linux内核4.4.5

对于32位Ubuntu系统:

$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.5-wily/linux-headers-4.4.5-040405_4.4.5-040405.201503091931_all.deb
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.5-wily/linux-headers-4.4.5-040405-generic_4.4.5-040405.201503091931_i386.deb
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.5-wily/linux-image-4.4.5-040405-generic_4.4.5-040405.201503091931_i386.deb

对于64位Ubuntu系统:

$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.5-wily/linux-headers-4.4.5-040405_4.4.5-040405.201503091931_all.deb
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.5-wily/linux-headers-4.4.5-040405-generic_4.4.5-040405.201503091931_amd64.deb
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.5-wily/linux-image-4.4.5-040405-generic_4.4.5-040405.201503091931_amd64.deb

然后使用命令安装内核4.4.5:

$sudo dpkg -i *.deb

然后使用命令更新GRUB引导加载程序:

$sudo update-grub

示例输出:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.5-040405-generic
Found initrd image: /boot/initrd.img-4.4.5-040405-generic
Found linux image: /boot/vmlinuz-4.2.0-16-generic
Found initrd image: /boot/initrd.img-4.2.0-16-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin

如果我们正在使用BURG引导加载程序,则运行:

$sudo update-burg

然后,重新启动系统并登录新安装的内核。

检查是否已使用命令安装了新内核:

$uname -r

示例输出:

4.4.5-040405-generic

如果在升级内核后遇到任何问题,请强制重新启动系统,并通过从引导菜单中选择"Ubuntu"的"高级选项"来登录旧内核。

然后用命令卸载新内核:

$sudo apt-get remove linux-headers-4.4* linux-image-4.4*

最后重新启动系统。