`

centos6.4或者6.5使用yum的elrepo源升级内核

 
阅读更多
了解一下elrepo
elrepo是CentOS十分有用的稳定的软件源,与其他软件源不一样的是,这个第三方源主要是提供硬件驱动、内核更新方面的支持,如显卡、无线网卡、内核等等,现在已经支持centos7.x+,更新较快。

1、查看centos版本
引用
[root@localhost ~]# cat /etc/centos-release
CentOS release 6.5 (Final)

2、查看内核
引用
[root@localhost ~]# uname -r
2.6.32-358.el6.x86_64

3、首先你要做的就是导入public key
引用
[root@localhost ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

4、然后安装ELRepo到CentOS-6.x中
注意:
elrepo-release-6-6.el6.elrepo.noarch.rpm这是针对centos6.0+版本的,网上的很多的文章都是错误的-6-5

  • 1、安装 ELRepo for RHEL-6, SL-6 or CentOS-6:
  • 引用
    rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
  • 2、安装 ELRepo for RHEL-7, SL-7 or CentOS-7:
  • 引用
    rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm (external link)
  • 3、安装 ELRepo for RHEL-5, SL-5 or CentOS-5:
  • 引用
    rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm (external link)


执行安装!
引用
[root@localhost ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

返回:
引用
Retrieving http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
Preparing...                ########################################### [100%]
   1:elrepo-release         ########################################### [100%]


5、安装kernel-lt(lt=long-term)
引用
[root@localhost ~]# yum --enablerepo=elrepo-kernel install kernel-lt -y

国外网速较慢,耐心等待....返回:
引用
........
* base: mirror.bit.edu.cn
* elrepo: repos.lax-noc.com
* elrepo-kernel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.sina.cn
* updates: mirror.bit.edu.cn
base                                                                         | 3.7 kB     00:00    
elrepo                                                                       | 2.9 kB     00:00    
elrepo/primary_db                                                            | 716 kB     00:45    
https://mirrors.tuna.tsinghua.edu.cn/elrepo/kernel/el6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tuna.tsinghua.edu.cn'"
Trying other mirror.
elrepo-kernel                                                                | 2.9 kB     00:00    
elrepo-kernel/primary_db                                                     |  19 kB     00:00    
extras                                                                       | 3.4 kB     00:00    
extras/primary_db                                                            |  37 kB     00:00    
updates                                                                      | 3.4 kB     00:00    
updates/primary_db                                                           | 2.0 MB     00:01    
Setting up Install Process
Resolving Dependencies
--> Running transaction check
.....
Total download size: 33 M
Installed size: 154 M
Downloading Packages:
http://repos.lax-noc.com/elrepo/kernel/el6/x86_64/RPMS/kernel-lt-3.10.103-1.el6.elrepo.x86_64.rpm: [Errno 12] Timeout on http://repos.lax-noc.com/elrepo/kernel/el6/x86_64/RPMS/kernel-lt-3.10.103-1.el6.elrepo.x86_64.rpm: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
Trying other mirror.
kernel-lt-3.10.103-1.el6.elrepo.x86_64.rpm                                                                                            |  33 MB     68:27    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : kernel-lt-3.10.103-1.el6.elrepo.x86_64                                                                                                    1/1
  Verifying  : kernel-lt-3.10.103-1.el6.elrepo.x86_64                                                                                                    1/1

Installed:
  kernel-lt.x86_64 0:3.10.103-1.el6.elrepo                                                                                                                  

Complete!
You have new mail in /var/spool/mail/root

或者安装kernel-ml(ml=mainline)
引用
yum --enablerepo=elrepo-kernel install kernel-ml -y

二者任选其一!
6、编辑grub.conf文件,修改Grub引导顺序
引用
vim /etc/grub.conf

i default=1修改为 default=0,esc 键,输入 :wq保存退出。
引用
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.28-1.el6.elrepo.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-3.10.28-1.el6.elrepo.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8
rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-3.10.28-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-431.3.1.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8 r
d_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img
title CentOS (2.6.32-431.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO
_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-431.el6.x86_64.img


注意:

确认刚安装好的内核在哪个位置,然后设置default值(从0开始),一般新安装的内核在第一个位置,所以设置default=0。
7、重启centos
引用
[root@localhost ~]# reboot

8、重新查看内核
引用
[root@localhost ~]# uname -r
3.10.103-1.el6.elrepo.x86_64


参考:http://www.511yj.com/centos-yum-kernel.html
分享到:
评论

相关推荐

    CentOS 6.5 最新可用的 Yum 源

    CentOS 6.5 的 软件源很多官方已经停止维护,该文件包内配置好的yum源是可以正常使用的。将原/etc/yum.repos.d/目录下原来的 .repo 备份, 然后把本文件包内的repo文件复制过去, yum clean all 后,再 yum ...

    centos 和 linux 6.5 yum包

    Linux 6.5和CentOS是两种不同的但密切相关的基础操作系统,它们都基于开源的Linux内核。Yum(Yellowdog Updater, Modified)是RPM包管理器,用于自动化安装、升级、卸载和查询软件包,对于基于RPM的系统如CentOS,它...

    redhat6.5修改yum源

    内含需要安装的rpm包和修改后的yum源配置。 python-urlgrabber-3.9.1-11.el6.noarch.rpm yum-3.2.29-40.el6.centos.noarch.rpm yum-metadata-parser-1.1.2-16.el6.i686.rpm yum-metadata-parser-1.1.2-16.el6.x86_64...

    CentOS 6.5 yum本地源.md

    CentOS6.5 对本地yum源的安装。以便在无网络的情况下也能够安装所需要的东西

    centos6.4iso镜像

    centos6.4的安装镜像。可以下一个VM,安装流程百度一大堆。

    CentOS6.4单用户下root密码破解

    ### CentOS6.4单用户模式下Root密码破解详解 #### 一、背景介绍 在Linux系统管理中,可能会遇到忘记root账户密码的情况。这不仅会给系统维护带来不便,还可能影响到系统的正常使用。CentOS 6.4作为一款广泛使用的...

    centos9ISO镜像及yum源配置文件

    本文将深入探讨如何下载与安装CentOS 9 Stream ISO镜像,并详细讲解如何配置YUM源,以便在系统中进行软件包的安装和更新。 一、CentOS 9 Stream ISO镜像获取 CentOS 9 Stream的ISO镜像是安装系统的媒介,可以从官方...

    vm虚拟机centos6.4百度云盘下载地址(永久有效)

    VMware上的centos6.4虚拟机,直接下载解压导入即可使用

    CentOS6.5下YUM安装最新MySQL5.7.12(王三旗亲自整理,最简单明了)

    CentOS6.5下YUM安装最新MySQL5.7.12

    CentOS6.4 SSH Telnet服务器配置

    ### CentOS 6.4 SSH与Telnet服务器配置详解 #### 一、SSH服务器概述与功能 **SSH**(Secure Shell)是...通过本文所述的方法和步骤,用户可以轻松地在CentOS 6.4环境中搭建并使用SSH服务器,以满足实际工作中的需求。

    Centos6.4_安装oracle_11g教程

    在本教程中,我们将探讨如何在CentOS 6.4操作系统上安装Oracle 11g数据库。Oracle 11g是Oracle公司推出的企业级数据库管理系统,适用于大型企业应用,提供高性能、高可用性和安全性。在CentOS 6.4上安装Oracle 11g...

    centos6.4配置163 yum源的方法

    在使用Linux发行版如CentOS时,YUM(Yellowdog Updater, Modified)是一个非常重要的包管理工具,它使得用户可以方便地安装、更新和管理软件包。然而,CentOS默认的YUM源可能位于地理位置较远的服务器上,导致更新...

    centos6.4U盘安装

    本文将详细介绍如何使用U盘来安装CentOS 6.4版本的操作系统。 #### 二、准备工作 在正式开始之前,请确保已经准备好了以下几项内容: 1. **设备准备**:需要一台Windows操作系统PC和一台Linux操作系统PC(用于制作...

    CentOS 6.4安装(超级详细图解教程)

    在开始安装前,确保您有一张已下载好的CentOS 6.4安装光盘或ISO镜像文件,以及一个能够启动该镜像的设备,如CD/DVD或者USB闪存驱动器。同时,确定您的计算机硬件兼容CentOS 6.4,并且备份好所有重要的数据,以防万一...

    RedHatEnterprise6.4配置CentOS6.4软件源借鉴.pdf

    在本文档中,我们主要探讨了如何在Red Hat Enterprise Linux (RHEL) 6.4系统上配置使用CentOS 6.4的软件源。这是一个常见的做法,因为两个发行版的兼容性较高,使得用户可以利用CentOS的开源替代品来获取软件更新...

    centos6 yum 源

    centos6_64 yum配置,一键搞定.centos6_64 yum配置,一键搞定

    vm 虚拟机上安装CentOS6.4详细安装

    3. **便捷更新**:CentOS支持使用`yum`命令进行在线升级,用户可以方便地获取最新安全补丁和软件包,无需购买Red Hat的支持服务。 接下来,我们按照以下步骤在VMware Workstation 10上安装CentOS 6.4: 1. **安装...

Global site tag (gtag.js) - Google Analytics