升级CentOS内核 - 2.6升级到3.10/最新内核
##记得切换到root用户执行升级操作.
[root@localhost ~]# uname -a ##旧版
Linux localhost.localdomain 2.6.32-279.el6.i686 #1 SMP Fri Jun 22 10:59:55 UTC 2012 i686 i686 i386 GNU/Linux
[root@localhost ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@localhost ~]# rpm -ivh https://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
[root@localhost ~]# yum --enablerepo=elrepo-kernel install kernel-lt -y ##此步会有点慢
[root@localhost ~]# vim /etc/grub.conf default=1 改为 default=0 ##设置默认以3.10核心启动,默认是按照旧的核心启动
[root@localhost ~]# reboot
[root@localhost ~]# uname -a ##升级后的版本
Linux localhost.localdomain 3.10.104-1.el6.elrepo.i686 #1 SMP Fri Oct 21 09:11:59 EDT 2016 i686 i686 i386 GNU/Linux
网上有很多操作案例都失效的。
上面方法适用于centos6,如果是centos7则rpm文件替换为https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
2、修改grub的主配置文件/etc/grub.conf,设置default=0,表示第一个title下的内容为默认启动的kernel(一般新安装的内核在第一个位置),修改之后如下:
[root@localhost ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=
timeout=
splashimage=(hd0,)/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.-.el6.x86_64)
root (hd0,)
kernel /vmlinuz-3.10.-.el6.x86_64 ro root=UUID=--472c-8ca4-110fb82e9959 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF- rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-3.10.-.el6.x86_64.img
title CentOS (2.6.-.el6.x86_64)
root (hd0,)
kernel /vmlinuz-2.6.-.el6.x86_64 ro root=UUID=--472c-8ca4-110fb82e9959 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF- rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.-.el6.x86_64.img
3、重启系统,这时候你的内核就成功升级了,执行uname -r
内核升级wiki:http://elrepo.org/tiki/tiki-index.php
方法二:
cd /etc/yum.repos.d
wget http://www.hop5.in/yum/el6/hop5.repo
yum install kernel-ml-aufs kernel-ml-aufs-devel -y
本方法没有测试过,有空再试试。
升级CentOS内核 - 2.6升级到3.10/最新内核的更多相关文章
- 升级CentOS内核 - 2.6升级到3.10
*因为学习docker的需要,docker的官方推荐内核使用3.8以上,所以本人决定把CentOS内核升到长期稳定版的3.10. ##记得切换到root用户执行升级操作. [root@localhos ...
- 使用yum快速升级CentOS 6.5内核到 3.10.28
网上有不少升级CentOS内核的文章,如<CentOS 6.5 升级内核到 3.10.28>,大部分都是下载源码编译,有点麻烦. 在yum的ELRepo源中,有mainline(3.13. ...
- 升级Centos 7/6内核版本到4.12.4的方法
一.查看那系统内核版本 二.升级内核 三.修改grub中默认的内核版本 四.重启系统并查看系统内核 公司打算上Docker服务,目前需要安装运行环境,Docker新的功能除了需要Centos 7系统之 ...
- yum-cron更新 CentOS yum update 不升级内核版本方法
http://www.360doc.com/content/15/0608/17/15798950_476597844.shtml 相关yum-cron说明有一些 CentOS yum update ...
- 升级CentOS 7.4内核版本的三种方案
https://blog.csdn.net/breeze915/article/details/79243673 在实验环境下,已安装了最新的CentOS 7.4操作系统,现在需要升级内核版本. 实验 ...
- 升级CentOS 7.4内核版本--升级到最新
在实验环境下,已安装了最新的CentOS 7.4操作系统,现在需要升级内核版本.实验环境 CentOS-7-x86_64-Minimal-1708.isoCentOS Linux release 7. ...
- Centos LInux 7.0 内核3.1 升级简化流程
Centos LInux 7.0 内核3.1 升级建华流程 1)#导入ELRepo软件仓库的公共秘钥rpm --import https://www.elrepo.org/RPM-GPG-KEY-el ...
- Docker-01 无人值守升级 CentOS 6.x 系统内核到 3.10.x 长期支持版
#!/bin/bash # # 无人值守升级 CentOS .x 系统内核到 3.10.x 长期支持版 # # # .检查操作系统是否为 CentOS .x # cat /etc/centos-rel ...
- CentOS 6.4中升级编译安装GCC 4.8.1 + GDB 7.6.1 + Eclipse 以及Kdump配置
在CentOS 6.4中编译安装GCC 4.8.1 + GDB 7.6.1 + Eclipse 今天在isocpp上看到"GCC 4.8.1 released, C++11 feature ...
随机推荐
- matlab函数 bwperim
功能:查找二值图像的边缘. 用法: BW2 = bwperim(BW1) BW2 = bwperim(BW1,conn) BW2 = bwperim(BW1,conn)表示从输入图像BW1中返回只包括 ...
- Hibernate Session的delete()方法
本文介绍Hibernate Session的delete()方法.delete()方法用于从数据库中删除与Java对象对应的记录.对应游离对象和持久化对象,delete语句会做出不同的反应. AD: ...
- ubuntu下终于安装好了nvidia的gt540显卡驱动
ubuntu下终于安装好了nvidia的gt540显卡驱动.估计好多童鞋怕麻烦都放弃安装了哈. 先看看效果. ~$ lspci |grep -i vga :) :00.0 VGA compatible ...
- 一个工程多个Target
当我们同一个工程需要在不同情形下编译打包,比如打个人包.企业包的时候,其中可能有一些细小的差别,又不想每次都先修改再打包的时候,我们可以通过创建多个Target来实现. 1.copy原有Target ...
- Git 时光穿梭鸡 撤销修改
工作区内容修改了, 但是并未add到暂存区, 想 回退到上一个版本 在readme.txt中添加了一行: Git is a distributed version control system. Gi ...
- mySQL多表查询与事务
一.范式 1. 什么是范式 1.1 什么是范式 范式:设置一个科学的.规范的数据库,需要满足的一些规则 1.2 有哪些范式 共有:6大范式 第1范式:1NF 满足最基本的要求 第2范式:2NF 在1N ...
- Nacos深入浅出(五)
四中标色的代码 result = ConfigService.dump(dataId, group, tenant, cf.getContent(), lastModified); 我们看下这个方法 ...
- 字符串split函数
https://www.cnblogs.com/hjhsysu/p/5700347.html 函数:split() Python中有split()和os.path.split()两个函数,具体作用如下 ...
- [题解](prufer)明明的烦恼
https://www.cnblogs.com/noip/archive/2013/03/10/2952520.html 以及高精(抄 #include<iostream> #includ ...
- 自动化测试资源(二):火狐浏览器驱动 geckodriver
geckodriver:https://github.com/mozilla/geckodriver geckodriver 历史版本下载列表:https://github.com/mozilla/g ...