码迷,mamicode.com
首页 > 其他好文 > 详细

更新centos7内核

时间:2020-01-03 00:05:01      阅读:92      评论:0      收藏:0      [点我收藏+]

标签:term   files   its   uil   release   模块   system   option   lib   

centos7内核更新

 

uname -a  #check the current version
cat /etc/redhat-release #check current kernel verison
rpm -qa | grep kernel #check the current kernel verison that has been installed

#查看是否有关于内核的源,elrepo(RPM repository for Enterprise Linux package),其实是个企业级Linux的仓库,这里只用到内核包,所以称为内核源

yum install https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm #yum install kernel repo

yum info --enablerepo=elrepo-kernel kernel-lt kernel-ml #check infomation of kernel-lt and kernel-ml

rpm -qa | grep kernel #check the current verison of kernel 

yum remove $(rpm -qa | grep kernel | grep -v $(uname -r)) #remove the specify verison of kernel-tools and kernel-tools-libs
#LT Version(Long term support version)

# Install LT Version
yum install --enablerepo=elrepo-kernel -y kernel-lt kernel-lt-headers kernel-lt-devel kernel-lt-tools kernel-lt-tools-libs
# Install ML Version
#yum install --enablerepo=elrepo-kernel -y kernel-ml kernel-ml-headers kernel-ml-devel kernel-ml-tools kernel-ml-tools-libs
rpm -qa | grep kernel #check the kernel you have installed

grub2-mkconfig -o /boot/grub2/grub.cfg #rebuild configuration of grub2(Optional operation)

awk -F\‘ ‘$1=="menuentry " {print i++ " : " $2}‘ /etc/grub2.cfg #check the useful kernel that you hav installed
#选择需要启动的内核
grub2-set-default 0 
yum update时不升级内核
vi /etc/yum.conf
#最下面加个*
exclude=kernel*

 

 

#内核相关的包说明:
#kernel-lt
#The Linux kernel. (The core of any Linux-based operating system.)
#最核心的包,所有Linux系统的基础
#kernel-lt-devel
#Development package for building kernel modules to match the kernel.
#内核开发包,更多是提供给内核开发人员开发内核的一些功能模块
#kernel-lt-doc
#Various bits of documentation found in the kernel sources.
#内核包的指引文档
#kernel-lt-headers
#Header files of the kernel, for use by glibc.
#内核的头文件,一般其他应用需要调用内核能力就要引入这些头文件
#kernel-lt-tools
#Assortment of tools for the kernel.
#内核级别的一些工具
#kernel-lt-tools-libs
#Libraries for the kernel tools.
#内核级别工具所依赖的包
#kernel-lt-tools-libs-devel
#Development package for the kernel tools libraries.
#内核级别工具开发所需的依赖包

 

更新centos7内核

标签:term   files   its   uil   release   模块   system   option   lib   

原文地址:https://www.cnblogs.com/zmichael/p/12142675.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!