更新centos7内核

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.
#内核级别工具开发所需的依赖包

 

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

时间: 2024-08-28 22:44:17

更新centos7内核的相关文章

Linux入门之CentOS7内核编译三部曲(1)

Linux入门之CentOS7内核编译三部曲(1) 我们知道,一个Linux系统的主要组成是由liunx内核核心和一些支持模块组合而成的.但是在某些场合中,需要某项功能,而当前内核的核心或者模块不支持此功能,那么就需要对内核进行一个升级或者重新编译内核添加相应的功能,以此提供了对此功能的支持. 编译前的准备 认识kernel 所为kernel,就是一种操作系统的核心,当然也是一个文件,而这种核心提供了对一些硬件的支持,一般来说其中包含了一些对常见硬件核心驱动的核心代码.启动系统时会通过加载MBR

Linux入门之CentOS7内核编译三部曲(2)

Linux入门之CentOS7内核编译三部曲(2) 在linux系统中,编译完了内核,得到了所需的功能,并不能表示就已经能完美完成我们的所需.因为内核只是做一个核心的硬件及核心代码的支持,而注意的模块支持任然是对应版本的内核模块文件.这些文件决定着平时能否使用哪些功能.这次不会介绍如果添加给上次编译的新内核模块功能,主要介绍模块的功能和作用以及其加载和卸载. 查看当前系统以及加载的内核模块命令:lsmod  modinfo lsmod 命令 lsmod - program to show the

Linux入门之CentOS7内核编译三部曲(3)

Linux入门之CentOS7内核编译三部曲(3) 在上篇通过一些简单的例子和使用介绍了linux系统中模块的功能和作用.那么每次系统启动完成之后,又是怎么去自动加载所需要的模块,那么回过头来看还是要连续模块加载具体在系统启动中的哪个阶段开始触发的.同时模块的加载是依据内核本身的预定程序,还是linux文件系统中的相应配置文件呢? 默认安装的模块文件路径:/lib/modules/$(uname -r)/kernel,如: #查看内核模块列表目录 [[email protected] ~]# l

centos7内核升级

默认centos7的内核版本是3.10,升级的原因是为了测试openvswitch的vlan技术,默认openvswitch的2.3版本是允许centos7默认内核3.10支持,下面是软件与内核版本对比    Open vSwitch   Linux kernel    ------------   -------------        1.4.x      2.6.18 to 3.2        1.5.x      2.6.18 to 3.2        1.6.x      2.6

centos7内核版本升级

1.更新仓库 yum -y update 2.启用 ELRepo 仓库 ELRepo 仓库是基于社区的用于企业级 Linux 仓库,提供对 RedHat Enterprise (RHEL) 和 其他基于 RHEL的 Linux 发行版(CentOS.Scientific.Fedora 等)的支持. ELRepo 聚焦于和硬件相关的软件包,包括文件系统驱动.显卡驱动.网络驱动.声卡驱动和摄像头驱动等. 启用 ELRepo 仓库: rpm --import https://www.elrepo.or

如何升级centos7 内核方法

关于内核说明: 版本性质:主分支ml(mainline),稳定版(stable),长期维护lt(longterm) 版本命名格式:“A.B.C" A代表内核版本号 B代表内核主版本号 C代表内核次版本号 一.检查内核版本 [[email protected] ~]# uname -r 3.10.0-514.el7.x86_64 [[email protected] ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [

centos7内核升级及curl证书过期处理

先看下当前系统的linux内核版本 uname -r 3.10.0-229.el7.x86_64 升级步骤: 1.rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org 导入Key2.输入:rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm来安装elrepo的yum源3.在这个源中,保留了内核的最新两个版本.应用名字叫:kernel-ml.

centos7 内核参数优化

cat /etc/sysctl.conf #CTCDN系统优化参数 #关闭ipv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 # 避免放大攻击 net.ipv4.icmp_echo_ignore_broadcasts = 1 # 开启恶意icmp错误消息保护 net.ipv4.icmp_ignore_bogus_error_responses = 1 #关闭路由转发 net.ipv4.ip_

Centos7内核编译

下载新内核:https://www.kernel.org/ 解决依赖关系:#yum -y install gcc ncurses-devel bc perl编译安装新内核:1.获取内核编码,解压至/usr/src#tar xf linux-4.3.tar.xz -C /usr/src#ln -sv /usr/src/linux-4.3 /usr/src/linux2.配置内核特性#cp /boot/config-* /usr/src/linux/.config#make menuconfig#m