Docker安装及centos内核升级
[root@gmdai ~]# sudo yum installhttp://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm
[root@gmdai ~]# sudo yum install docker-io
[root@gmdai ~]# service docker start
[root@gmdai ~]# chkconfig docker on
[root@gmdai ~]# yum install git -y
[root@gmdai ~]# docker pulldaocloud.io/library/nginx:1.9.9 //pull镜像时报错让执行docker -d
Cannot connect to the Docker daemon. Is ‘docker-d‘ running on this host?
[root@gmdai ~]# docker -d
WARN[0000] You are running linux kernel version2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgradeyour kernel to 3.10.0. //提示内核版本号太低
INFO[0000] Listening for HTTP on unix(/var/run/docker.sock)
rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernelinstallkernel-ml -y
vim /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub aftermaking 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)/grub/splash.xpm.gz
hiddenmenu
title CentOS (4.4.0-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-4.4.0-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_gmdai-lv_rootrd_NO_LUKS rd_LVM_LV=vg_gmdai/lv_swap rd_NO_MD rd_LVM_LV=vg_gmdai/lv_rootcrashkernel=auto.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-4.4.0-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-431.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.el6.x86_64 roroot=/dev/mapper/vg_gmdai-lv_root rd_NO_LUKS rd_LVM_LV=vg_gmdai/lv_swap rd_NO_MDrd_LVM_LV=vg_gmdai/lv_root crashkernel=auto.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgbquiet
initrd /initramfs-2.6.32-431.el6.x86_64.img
确认刚安装好的内核在哪个位置,然后设置default值(从0开始),一般新安装的内核在第一个位置,所以设置default=0。
[root@gmdai ~]# uname -r
4.4.0-1.el6.elrepo.x86_64
本文出自 “技术宅私有空间” 博客,请务必保留此出处http://chulinx.blog.51cto.com/4098114/1763053
原文地址:http://chulinx.blog.51cto.com/4098114/1763053