linux装docker升级内核,升级centos6.5内核至3.10及安装docker

一、升级内核

将版本为2.6.32-431.el6.x86_64的内核升级为3.10.5-3.el6.x86_64

1、安装autfs相关软件执行升级操作

[root@linux-node1 yum.repos.d]# yum install kernel-ml-aufs kernel-ml-aufs-devel

2、修改内核默认启动顺序:

default=1

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

改为:

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

最终结果为:

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title CentOS (3.10.5-3.el6.x86_64)

root (hd0,0)

kernel /vmlinuz-3.10.5-3.el6.x86_64 ro root=UUID=5209c50c-75cb-479d-8cb3-2a60f6c2141f 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.img

以上步骤操作完之后,重启系统确认内核版本

Last login: Sun May 22 14:52:31 2016 from 192.168.1.4

[root@linux-node1 ~]# uname -r

3.10.5-3.el6.x86_64

[root@linux-node1 ~]# grep aufs /proc/filesystems

nodev   aufs

[root@linux-node1 ~]#

二、安装docker

3、安装docker

[root@linux-node1 opuser]# yum  install docker-io -y

4、启动docker

[root@linux-node1 ~]# /etc/init.d/docker start

Starting docker:        [  OK  ]

[root@linux-node1 ~]#

5、查看启动状态:

[root@linux-node1 ~]# /etc/init.d/docker status

docker (pid  1242) is running...

[root@linux-node1 ~]#

6、查看日志:

\nSun May 22 07:43:13 CST 2016\n

time="2016-05-22T07:43:13.450506633+08:00" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"

time="2016-05-22T07:43:16.507928980+08:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""

time="2016-05-22T07:43:16.624039450+08:00" level=warning msg="Running modprobe bridge nf_nat failed with message: insmod /lib/modules/3.10.5-3.el6.x86_64/kernel/net/llc/llc.ko \ninsmod /lib/modules/3.10.5-3.el6.x86_64/kernel/net/802/stp.ko \ninsmod /lib/modules/3.10.5-3.el6.x86_64/kernel/net/bridge/bridge.ko \ninsmod /lib/modules/3.10.5-3.el6.x86_64/kernel/net/netfilter/nf_conntrack.ko \ninsmod /lib/modules/3.10.5-3.el6.x86_64/kernel/net/netfilter/nf_nat.ko \n, error: exit status 1"

time="2016-05-22T07:43:17.580829694+08:00" level=warning msg="Your kernel does not support swap memory limit."

time="2016-05-22T07:43:17.583622267+08:00" level=info msg="Loading containers: start."

time="2016-05-22T07:43:17.583830796+08:00" level=info msg="Loading containers: done."

time="2016-05-22T07:43:17.583851803+08:00" level=info msg="Daemon has completed initialization"

time="2016-05-22T07:43:17.583881135+08:00" level=info msg="Docker daemon" commit="786b29d/1.7.1" execdriver=native-0.2 graphdriver=devicemapper version=1.7.1

[root@linux-node1 ~]#

7、如果docker启动失败,而且日志中出现如下内容:

[root@linux-node1 ~]# cat /var/log/docker

\nSun May 22 07:41:07 CST 2016\n

/usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference

[root@linux-node1 ~]#

则需要安装: device-mapper-libs库

[root@linux-node1 ~]# yum upgrade device-mapper-libs

至此将centos6.5内核从2.6.32-431.el6.x86_64升级到3.10.5-3.el6.x86_64

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值