yum 源能夠配到國內的鏡像來加速 阿里雲,網易,搜狐均可以centos
這裏給個阿里雲的說明 http://mirrors.aliyun.com/hel...ui
先升級 CentOS 到 6.8 Finalthis
yum update
配置 elrepo(官網) 提供的內核源來升級內核阿里雲
先導入公鑰code
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
導入源get
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
而後能夠選擇安裝最新版內核,或者穩定版內核it
最新版io
yum –enablerepo=elrepo-kernel install -y kernel-ml
穩定版import
yum --enablerepo=elrepo-kernel install kernel-lt -y
最後編輯 /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 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.104-1.el6.elrepo.x86_64) root (hd0,0) kernel /boot/vmlinuz-3.10.104-1.el6.elrepo.x86_64 ro root=UUID=e70a0f35-5468-435d-b625-5924aee0a8ad 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-3.10.104-1.el6.elrepo.x86_64.img title CentOS (2.6.32-642.11.1.el6.x86_64) root (hd0,0) kernel /boot/vmlinuz-2.6.32-642.11.1.el6.x86_64 ro root=UUID=e70a0f35-5468-435d-b625-5924aee0a8ad 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-642.11.1.el6.x86_64.img title CentOS (2.6.32-358.el6.x86_64) root (hd0,0) kernel /boot/vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=e70a0f35-5468-435d-b625-5924aee0a8ad 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-358.el6.x86_64.img
title順序從上往下 0,1,2
默認新裝的應該排在最上面
因此把default值改爲0
而後重啓
查看版本信息
#cat /etc/redhat-release CentOS release 6.8 (Final) # uname -r 3.10.104-1.el6.elrepo.x86_64
搞定