您的位置:首页 > 运维架构 > Docker

centos6.5 安装docker经历

2015-12-28 13:47 597 查看
centos6.5 安装docker经历


centos6.5 内核版本为2.6.32-431,按照官方的说法,这是最低要求,实际安装是有问题滴。

一:安装 docker

运行:
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install docker-io

nstalled size: 20 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 4.9 M
(1/6):docker-io-1.4.1-3.el6.x86_64.rpm | 4.5 MB 00:00
(2/6):lua-alt-getopt-0.7.0-1.el6.noarch.rpm | 6.9 kB 00:00
(3/6):lua-filesystem-1.4.2-1.el6.x86_64.rpm | 24 kB 00:00
(4/6):lua-lxc-1.0.7-1.el6.x86_64.rpm | 15 kB 00:00
(5/6):lxc-1.0.7-1.el6.x86_64.rpm | 120 kB 00:00
(6/6):lxc-libs-1.0.7-1.el6.x86_64.rpm | 249 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------
Total 17 MB/s | 4.9 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing:lxc-libs-1.0.7-1.el6.x86_64 1/6
Installing:lua-filesystem-1.4.2-1.el6.x86_64 2/6
Installing:lua-lxc-1.0.7-1.el6.x86_64 3/6
Installing:lua-alt-getopt-0.7.0-1.el6.noarch 4/6
Installing:lxc-1.0.7-1.el6.x86_64 5/6
Installing:docker-io-1.4.1-3.el6.x86_64 6/6
Verifying:lxc-1.0.7-1.el6.x86_64 1/6
Verifying:lua-lxc-1.0.7-1.el6.x86_64 2/6
Verifying:lxc-libs-1.0.7-1.el6.x86_64 3/6
Verifying:docker-io-1.4.1-3.el6.x86_64 4/6
Verifying:lua-alt-getopt-0.7.0-1.el6.noarch 5/6
Verifying:lua-filesystem-1.4.2-1.el6.x86_64 6/6

Installed:
docker-io.x86_64 0:1.4.1-3.el6

Dependency Installed:
lua-alt-getopt.noarch 0:0.7.0-1.el6 lua-filesystem.x86_64 0:1.4.2-1.el6 lua-lxc.x86_64 0:1.0.7-1.el6 lxc.x86_64 0:1.0.7-1.el6
lxc-libs.x86_64 0:1.0.7-1.el6

Complete!

二: 运行docker
service docker start

docker -d

INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] WARNING: You are running linux kernel version 2.6.32, which might be unstable running docker. Please upgrade your kernel to 3.1.0.
docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference

解决运行提示问题:
1):升级kernel2.6.32到 3.1

1. rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2. rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

3. yum --enablerepo=elrepo-kernel -y install kernel-lt

4. vi /etc/grub.conf 注释掉 2.6的版本

5. reboot

2)解决relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
安装缺少的包:
yum upgrade device-mapper-libs
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: