Cnetos7升级内核

作者: root007 分类: Linux 发布时间: 2021-03-29 18:28
#cat /etc/redhat-release 
#uname -a
导入public key
#rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
安装ELRepo到CentOS 可以去http://elrepo.org/tiki/tiki-index.php选择要安装的ELRepo
To install ELRepo for RHEL-7, SL-7 or CentOS-7:
#yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm 
安装新的内核版本
列出可以使用的 kernel 包版本:
lt:长期维护版
ml:最新稳定版
# yum list available --disablerepo=* --enablerepo=elrepo-kernel
安装 kernel-lt(lt=long-term)
yum --enablerepo=elrepo-kernel  install kernel-lt -y
或者 安装kernel-ml(ml=mainline)
 yum --enablerepo=elrepo-kernel install kernel-ml -y
安装指定的 kernel 版本:
yum install -y kernel-lt-4.4.218-1.el7.elrepo --enablerepo=elrepo-kernel
修改Grub引导顺序
awk -F \' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
grub2-set-default 0
grub2-editenv list 
reboot

指定安装内核版本

下载对应内核版本:
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/

 wget http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/kernel-ml-devel-4.18.1-1.el7.elrepo.x86_64.rpm

# 安装内核
rpm -ivh kernel-lt-4.4.249-1.el7.elrepo.x86_64.rpm --forced
或者
yum localinstall -y kernel-ml*

# 查看插入顺序,看看而已
awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
awk -F \' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg

# 设置需要的内核最为启动项目
grub2-set-default 'CentOS Linux (4.4.249-1.el7.elrepo.x86_64) 7 (Core)'
或者
grub2-set-default 0 
# 然后查看启动顺序
grub2-editenv list

# 重启进入新的内核后执行下述代码可以删除老的内核
yum remove $(rpm -qa | grep kernel | grep -v $(uname -r))

2:

export Kernel_Version=4.19.12-1
wget http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/kernel-ml{,-devel}-${Kernel_Version}.el7.elrepo.x86_64.rpm
yum localinstall -y kernel-ml*

grub2-set-default 0 && grub2-mkconfig -o /etc/grub2.cfg

grubby –default-kernel

Docker官方的内核检查脚本建议(RHEL7/CentOS7: User namespaces disabled; add ‘user_namespace.enable=1’ to boot command line),使用下面命令开启:

登录后复制

grubby –args=”user_namespace.enable=1″ –update-kernel=”$(grubby –default-kernel)

发表评论

邮箱地址不会被公开。 必填项已用*标注


  • http://ediconcept.odns.fr/maillotdefootpascher.html
  • http://ediconcept.odns.fr/maillotsfootpascher.html
  • http://ediconcept.odns.fr/maillotsfootpascher2022.html
  • https://sergiofajardo.co/maillotdefootpascher.html
  • https://sergiofajardo.co/maillotsfootballpascher.html
  • https://sergiofajardo.co/maillotsfootpascherfrance.html
  • https://allphonetoys.com/maillotdefootpascher.html
  • https://allphonetoys.com/nouveaumaillotdefootpascher.html
  • https://allphonetoys.com/nouveaumaillotsdefootball.html
  • http://samosystem.nichost.ru/maillotdefootpascher.html
  • http://samosystem.nichost.ru/nouveaumodèlemaillotdefoot.html
  • http://samosystem.nichost.ru/pascherfemmesfootballjersey.html
  • http://w96397on.beget.tech/maillotdefootpascher.html
  • http://w96397on.beget.tech/pascherfootballt-shirts.html
  • http://w96397on.beget.tech/paschermaillotsdefootpromo.html
  • http://wesleywang.acsite.org/maillotdefootpascher.html
  • https://wesleywang.acsite.org/repliquemaillotsdefootballlivraisongratuite.html
  • https://wesleywang.acsite.org/retrovintagesoccerjerseys.html
  • https://www.rnkhabri.com/maillotdefootpascher.html
  • https://www.rnkhabri.com/personnaliséenfantssoccerjersey.html
  • https://www.rnkhabri.com/personnaliséfemmessoccervêtements.html
  • https://www.oujdacity.net/maillotdefootpascher.html
  • https://www.oujdacity.net/sitedemaillotdefootpascher.html
  • https://www.oujdacity.net/survetementdefoot.html
  • https://infendo.com/maillotdefootpascher.html
  • https://infendo.com/survetementdefootpascher.html
  • https://infendo.com/uniformedefootballdesjeunes.html
  • https://planitagency.com/maillotdefootpascher.html
  • https://planitagency.com/ventemaillotdefootpascherthailande2022.html
  • https://planitagency.com/vesteequipedefoot.html
  • http://immergut.com.br
  • https://immobiliarelerosemarine.com
  • https://immobilienfotografie24.de
  • http://immobilier-lemaroc.com
  • https://imobilideranca.com.br
  • https://impactdigital.space
  • https://imperibiza.com
  • https://impexworldltd.com
  • https://implant.gen.tr
  • https://impread.com
  • http://improveyourdance.com
  • http://improvisamos.com
  • http://impulsarh.com.ar
  • http://inamakethat.com
  • http://inanna.be
  • https://incomementorbox.com
  • https://incomerepairpro.com
  • https://indiatvnewss.com
  • https://indoranews.com
  • https://infendo.com
  • https://infinitebankingagenttraining.com
  • https://infinnium.com
  • http://influenceyourway.com
  • http://infocarbrokers.net
  • http://infohealth-usa.com
  • https://informatic-crew.fr
  • https://informatiotech.com
  • https://informeblumenau.com
  • https://infos-grossesse.fr
  • https://ingatlanmagus.com