1、安装epel安装源
[root@slave2 ~]# yum install http://mirrors.yun-idc.com/epel/6/x86_64/epel-release-6-8.noarch.rpm
2、安装docker
[root@slave2 ~]# yum install -y docker-io
3、启动docker
[root@slave2 ~]# service docker status
docker is stopped
[root@slave2 ~]# service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
[root@slave2 ~]# service docker status
docker dead but pid file exists
4、未启动成功,查看日志
[root@slave2 ~]# tail -f /var/log/docker
\nTue Mar 22 14:30:00 CST 2016\n
time="2016-03-22T14:30:00.573392559+08:00" level=warning msg="You are running linux kernel version 2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.10.0."
time="2016-03-22T14:30:00.589701077+08:00" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
/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
5、解决
[root@slave2 ~]# yum install device-mapper-event-libs
6、说明
虽然日志提示kernel版本要从2.6.32升级到3.10.0版本,但不代表2.6.32版本不支持,而是该版本不稳定,不升级内核一样可以支持docker