1.安装docker [iyunv@gmdai ~]# sudo yum install docker-io [iyunv@gmdai ~]# service docker start [iyunv@gmdai ~]# chkconfig docker on [iyunv@gmdai ~]# yum install git -y 2.内核版本太低,升级内核[iyunv@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? [iyunv@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) 3.升级内核yum --enablerepo=elrepo-kernelinstallkernel-ml -y 4.编辑grub.conf文件,修改Grub引导顺序 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。 5、重启,查看内核版本号[iyunv@gmdai ~]# uname -r 4.4.0-1.el6.elrepo.x86_64
|