背景介绍:
在RedHat/CentOS环境下安装Docker。官方文档要求Linux kernel至少3.8以上,且docker只能运行在64位的系统中。由于RHEL6和CentOS6的内核版本为2.6,因此必须要先升级内核
操作步�Y:
(1)yum安装带aufs模块的3.10内核
[root@xiaoya ~]# uname -r
2.6.32-573.el6.x86_64
[root@xiaoya ~]# cd /etc/yum.repos.d
[root@xiaoya yum.repos.d]# wget http://www.hop5.in/yum/el6/hop5.repo
[root@xiaoya yum.repos.d]# yum install kernel-ml-aufs kernel-ml-aufs-devel
(2)修改grub的主配置文件/etc/grub.conf,设置default=0,表示第一个title下的内容为默认启动的kernel(一般新安装的内核在第一个位置)
[root@xiaoya ~]# vim /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,0)# kernel /vmlinuz-version ro root=/dev/sda3# initrd /initrd-[generic-]version.img#boot=/dev/sdadefault=1 ##设置default=0,表示第一个title下的内容为默认启动的kernel(一般新安装的内核在第一个位置)timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitle CentOS (3.10.5-3.el6.x86_64) root (hd0,0) kernel /vmlinuz-3.10.5-3.el6.x86_64 ro root=UUID=014d414a-2fad-41ca-b7b3-c10fbe3a53b8 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-3.10.5-3.el6.x86_64.imgtitle CentOS 6 (2.6.32-573.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root=UUID=014d414a-2fad-41ca-b7b3-c10fbe3a53b8 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-573.el6.x86_64.img
(3)重启系统
[root@xiaoya ~]# uname -r3.10.5-3.el6.x86_64[root@xiaoya ~]# grep aufs /proc/filesystemsnodev aufs
出现以上两个情况,说明内核升级成功,也支持aufs
本文出自 “IT--小哥” 博客,请务必保留此出处http://402753795.blog.51cto.com/10788998/1785690