码迷,mamicode.com
首页 > 其他好文 > 详细

Docker 安装及内核升级

时间:2016-04-13 00:47:03      阅读:373      评论:0      收藏:0      [点我收藏+]

标签:docker安装   linux内核升级

Docker安装及centos内核升级

1.安装docker

[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

2.内核版本太低升级内核

[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)

3.升级内核

rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm

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

确认刚安装好的内核在哪个位置然后设置default0开始),一般新安装的内核在第一个位置所以设置default=0

 

5、重启,查看内核版本号

[root@gmdai ~]# uname -r

4.4.0-1.el6.elrepo.x86_64


本文出自 “技术宅私有空间” 博客,请务必保留此出处http://chulinx.blog.51cto.com/4098114/1763053

Docker 安装及内核升级

标签:docker安装   linux内核升级

原文地址:http://chulinx.blog.51cto.com/4098114/1763053

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!