centos6.x系统内核升级的方法

centos6.x系统内核升级的方法

1.先确定系统版本和内核版本
uname -r – 查看系统版本
cat /etc/issue

[root@centos6 ~]#  uname -r
2.6.32-431.el6.x86_64
[root@centos6 ~]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
  1. 安装elrepo yum源
[root@centos6 ~]# # rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

说明:安装elrepo yum源之前,先导入elrepo的key。

[root@centos6 ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm

如果出现错误:

[root@centos6 ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
curl: (35) SSL connect error
error: skipping http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm - transfer failed

需要升级一下nss

[root@centos6 ~]# yum update nss
安装成功就行可以继续下一步了

[root@centos6 ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
warning: /var/tmp/rpm-tmp.1A3o5c: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY
Preparing...                ########################################### [100%]
   1:elrepo-release         ########################################### [100%]

  1. 选择安装内核
    yum --enablerepo=elrepo-kernel -y install kernel-lt
.......
2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of mysql-libs
redland-1.0.7-11.el6.x86_64 has missing requires of libmysqlclient.so.16()(64bit)
redland-1.0.7-11.el6.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
  正在安装   : kernel-lt-4.4.232-1.el6.elrepo.x86_64                                                                                                                                           1/1 
  Verifying  : kernel-lt-4.4.232-1.el6.elrepo.x86_64                                                                                                                                           1/1 

已安装:
  kernel-lt.x86_64 0:4.4.232-1.el6.elrepo                                                                                                                                                          
完毕!
  1. 修改文件 /etc/grub.conf
[root@centos6 ~]# vim /etc/grub.conf
default=1
timeout=5
把default 改为default=0

centos6.x系统内核升级的方法_第1张图片
说明:表示第一个title下的内容为默认启动的kernel(一般新安装的内核在第一个位置).
5. 修改完了就重启系统让其生效

[root@centos6 ~]# reboot

重启后检查

[root@centos6 ~]# uname -r
4.4.232-1.el6.elrepo.x86_64

你可能感兴趣的:(centos,内核,linux)