运维开发网

linux kernel update

运维开发网 https://www.qedev.com 2020-06-03 14:29 出处:网络
linux内核升级 最近HW行动,报出来的linux系统内核漏洞,环境中全部是2.6.32-431.el6.x86_64的主机,需要全部升级到754版本,这也是第一次进行内核升级操作。

Linux内核升级

最近HW行动,报出来的linux系统内核漏洞,环境中全部是2.6.32-431.el6.x86_64的主机,需要全部升级到754版本,这也是第一次进行内核升级操作。

先找了一台和生产环境差不多的虚拟机(内核版本还是不一样,较高),通过aliyun直接进行yum更新,将更新下来的安装包保存下来,然后上传到内网的仓库中,重新打包镜像,让其他主机直接也能进行升级。

[[email protected] yum.repos.d]# yum upgrade kernel
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-754.el6 will be installed
--> Processing Dependency: kernel-firmware >= 2.6.32-754.el6 for package: kernel-2.6.32-754.el6.x86_64
--> Running transaction check
---> Package kernel-firmware.noarch 0:2.6.32-696.el6 will be updated
---> Package kernel-firmware.noarch 0:2.6.32-754.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================
 Package                                     Arch                               Version                                      Repository                          Size
======================================================================================================================================================================
Installing:
 kernel                                      x86_64                             2.6.32-754.el6                               aliyun                              32 M
Updating for dependencies:
 kernel-firmware                             noarch                             2.6.32-754.el6                               aliyun                              29 M

Transaction Summary
======================================================================================================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 61 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): kernel-2.6.32-754.el6.x86_64.rpm                                                                                                        |  32 MB     00:38     
(2/2): kernel-firmware-2.6.32-754.el6.noarch.rpm                                                                                               |  29 MB     00:51     
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                 672 kB/s |  61 MB     01:33     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Updating   : kernel-firmware-2.6.32-754.el6.noarch                                                                                                              1/3 
  Installing : kernel-2.6.32-754.el6.x86_64                                                                                                                       2/3 
  Cleanup    : kernel-firmware-2.6.32-696.el6.noarch                                                                                                              3/3 
  Verifying  : kernel-firmware-2.6.32-754.el6.noarch                                                                                                              1/3 
  Verifying  : kernel-2.6.32-754.el6.x86_64                                                                                                                       2/3 
  Verifying  : kernel-firmware-2.6.32-696.el6.noarch                                                                                                              3/3 

Installed:
  kernel.x86_64 0:2.6.32-754.el6                                                                                                                                      

Dependency Updated:
  kernel-firmware.noarch 0:2.6.32-754.el6                                                                                                                             

Complete!

在生产上,直接进行yum安装的时候,出现的安装包还不一样。

Dependencies Resolved

====================================================================================================================================================
 Package                                 Arch                           Version                                  Repository                    Size
====================================================================================================================================================
Installing:
 kernel                                  x86_64                         2.6.32-754.el6                           base                          32 M
Updating for dependencies:
 dracut                                  noarch                         004-409.el6_8.2                          base                         127 k
 dracut-kernel                           noarch                         004-409.el6_8.2                          base                          28 k
 kernel-firmware                         noarch                         2.6.32-754.el6                           base                          29 M

Transaction Summary
====================================================================================================================================================
Install       1 Package(s)
Upgrade       3 Package(s)

默认情况下,安装之后,直接重启系统,就会加载新的内核,不需要调整什么grub参数。

0

精彩评论

暂无评论...
验证码 换一张
取 消