Docker官网上针对Centos的的安装需求如下:

Docker requires a 64-bit installation regardless of your CentOS version. Also,your kernel must be 3.10 at minimum,which CentOS 7 runs.

看来如果我们想在低于3.x内核的操作系统(比如Centos6.6)上装Docker最新版,势必要升级内核了。且不说升级内核步骤繁琐、容易出错,单就这种比较怪异的搭配:Centos6.x + Kerneol3.X + Docker1.11,就没有人能够保证其稳定性。故我的建议是设法在Centos6.6上安装较低版本的Docker。事实上,对于内核版本要大于3.10这个要求,是从Docker1.8.2版本开始的,Docker之前的版本是可以运行在较低内核版本之上的,比如1.7.1。

  

首先,看下我的操作环境以及直接安装Docker的现象:

[root@bogon docker]# uname -a

Linux bogon 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[root@bogon docker]# cat /etc/redhat-release

CentOS release 6.6 (Final)

[root@bogon docker]# docker

bash: docker: command not found

[root@bogon docker]# yum install docker

Loaded plugins: fastestmirror,refresh-packagekit,security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* epel: dl.fedoraproject.org
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
http://repos.fedorapeople.org/repos/peter/erlang/epel-6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below kNowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

No package docker available.
Error: nothing to do

[root@bogon docker]# yum install docker-io

Loaded plugins: fastestmirror,security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* epel: pubmirror1.math.uh.edu
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
http://repos.fedorapeople.org/repos/peter/erlang/epel-6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below kNowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

No package docker-io available.
Error: nothing to do


可以看到,在Centos6.7的标准yum源中已经没有Docker的安装包了,这时,我们需要安装EPEL。

EPEL(Extra Packages for Enterprise Linux),企业版Linux额外包,RHEL分布非标准包的社区类库。安装如下:


[root@bogon docker]# rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.em6i9i: Header V3 RSA/SHA256 Signature,key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]


接下来安装Docker1.7.1,在1.7.1中,安装包名称为docker-io,故我们的安装命令如下:

[root@bogon docker]# yum install docker-io

Loaded plugins: fastestmirror,security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/Metalink | 7.1 kB 00:00
* base: mirrors.tuna.tsinghua.edu.cn
* epel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:13
http://repos.fedorapeople.org/repos/peter/erlang/epel-6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below kNowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

Resolving Dependencies
--> Running transaction check
---> Package docker-io.x86_64 0:1.7.1-2.el6 will be installed
--> Processing Dependency: lxc for package: docker-io-1.7.1-2.el6.x86_64
--> Processing Dependency: libcgroup for package: docker-io-1.7.1-2.el6.x86_64
--> Running transaction check
---> Package libcgroup.x86_64 0:0.40.rc1-23.el6 will be installed
---> Package lxc.x86_64 0:1.0.9-1.el6 will be installed
--> Processing Dependency: lua-lxc(x86-64) = 1.0.9-1.el6 for package: lxc-1.0.9-1.el6.x86_64
--> Processing Dependency: lua-alt-getopt for package: lxc-1.0.9-1.el6.x86_64
--> Processing Dependency: liblxc.so.1()(64bit) for package: lxc-1.0.9-1.el6.x86_64
--> Running transaction check
---> Package lua-alt-getopt.noarch 0:0.7.0-1.el6 will be installed
---> Package lua-lxc.x86_64 0:1.0.9-1.el6 will be installed
--> Processing Dependency: lua-filesystem for package: lua-lxc-1.0.9-1.el6.x86_64
---> Package lxc-libs.x86_64 0:1.0.9-1.el6 will be installed
--> Running transaction check
---> Package lua-filesystem.x86_64 0:1.4.2-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================================
Installing:
docker-io x86_64 1.7.1-2.el6 epel 4.6 M
Installing for dependencies:
libcgroup x86_64 0.40.rc1-23.el6 base 131 k
lua-alt-getopt noarch 0.7.0-1.el6 epel 6.9 k
lua-filesystem x86_64 1.4.2-1.el6 epel 24 k
lua-lxc x86_64 1.0.9-1.el6 epel 16 k
lxc x86_64 1.0.9-1.el6 epel 122 k
lxc-libs x86_64 1.0.9-1.el6 epel 257 k

Transaction Summary
================================================================================================================================================================================================================================
Install 7 Package(s)

Total download size: 5.1 M
Installed size: 20 M

Is this ok [y/N]: y

Downloading Packages:
(1/7): docker-io-1.7.1-2.el6.x86_64.rpm | 4.6 MB 00:10
(2/7): libcgroup-0.40.rc1-23.el6.x86_64.rpm | 131 kB 00:00
(3/7): lua-alt-getopt-0.7.0-1.el6.noarch.rpm | 6.9 kB 00:00
(4/7): lua-filesystem-1.4.2-1.el6.x86_64.rpm | 24 kB 00:00
(5/7): lua-lxc-1.0.9-1.el6.x86_64.rpm | 16 kB 00:00
(6/7): lxc-1.0.9-1.el6.x86_64.rpm | 122 kB 00:00
(7/7): lxc-libs-1.0.9-1.el6.x86_64.rpm | 257 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 457 kB/s | 5.1 MB 00:11
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature,key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6) <epel@fedoraproject.org>
Package: epel-release-6-8.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Is this ok [y/N]: y

Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : lxc-libs-1.0.9-1.el6.x86_64 1/7
Installing : lua-filesystem-1.4.2-1.el6.x86_64 2/7
Installing : lua-lxc-1.0.9-1.el6.x86_64 3/7
Installing : libcgroup-0.40.rc1-23.el6.x86_64 4/7
Installing : lua-alt-getopt-0.7.0-1.el6.noarch 5/7
Installing : lxc-1.0.9-1.el6.x86_64 6/7
Installing : docker-io-1.7.1-2.el6.x86_64 7/7
Verifying : lua-lxc-1.0.9-1.el6.x86_64 1/7
Verifying : lxc-libs-1.0.9-1.el6.x86_64 2/7
Verifying : lxc-1.0.9-1.el6.x86_64 3/7
Verifying : docker-io-1.7.1-2.el6.x86_64 4/7
Verifying : lua-alt-getopt-0.7.0-1.el6.noarch 5/7
Verifying : libcgroup-0.40.rc1-23.el6.x86_64 6/7
Verifying : lua-filesystem-1.4.2-1.el6.x86_64 7/7

Installed:
docker-io.x86_64 0:1.7.1-2.el6

Dependency Installed:
libcgroup.x86_64 0:0.40.rc1-23.el6 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.9-1.el6 lxc.x86_64 0:1.0.9-1.el6 lxc-libs.x86_64 0:1.0.9-1.el6

Complete!

[root@bogon docker]# docker -v

Docker version 1.7.1,build 786b29d/1.7.1


安装完成!

一、centos6.6安装Docker 1.7.1的更多相关文章

  1. Swift 后端开发

    作为一门新兴的现代化语言,Swift可以说是苹果在开发语言上的一次集大成之作,吸收了很多语言的优点。而且苹果还期望Swift能在服务端开发上能发挥作用。Perfect框架Perfect框架是Swift开发的Web应用服务器,它支持包括Redis、sqlite、Postgresql、MysqL、MongoDB、FileMaker这样的数据库,并且能以fastcgi或者Web服务器的形式提供服务。具体内容得到Swift源代码中可以找到。

  2. Swift构建总是在Docker中构建整个包

    使用像这样的Dockerfile时:当第3步运行时,swiftbuild将只编译应用程序一次,因为第二次执行将只使用已构建的对象,输出将是单个CompileSwiftModule’foo'然而,在运行第4步时,它似乎忽略了已经构建的任何东西,并重新重建整个事物,尽管没有任何改变且没有干净.我试过运行RUNls/foo/.build&&ls/tmp,一切似乎都到位了.我想要在现实中实现的是设置我的图像所以我首先从git克隆项目,构建它,然后copY在本地机器的任何变化中构建新的更新,但最终建立整个项目2次.

  3. 在Android上使用Docker

    是否可以在Android上构建Docker应用程序?我注意到现在没有,但内核毕竟是基于Linux内核的.如果有办法在没有生根的情况下做到这一点,那就更好了!是否有可能为Android创建Docker应用程序?如果是这样,有没有人知道任何进展?

  4. Docker 如何布置PHP开发环境

    本文主要介绍了如何使用Docker构建PHP的开发环境,文中作者也探讨了构建基于Docker的开发环境应该使用单容器还是多容器,各有什么利弊。推荐PHP开发者阅读。

  5. 一篇文章教会你部署vue项目到docker

    在前端开发中,部署项目是我们经常发生的事情,下面这篇文章主要给大家介绍了关于部署vue项目到docker的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考下

  6. PHP 应用容器化以及部署方法

    本文给大家分享的是如何把PHP应用容器化,以及使用docker在服务器上部署PHP应用,非常的简单实用,有需要的小伙伴可以参考下

  7. 在Docker快速部署Node.js应用的详细步骤

    这篇文章的目标是为了向大家展示如何在Docker的container里运行Node.js程序,文中通过图文与示例代码介绍的非常详细,有需要的朋友们可以参考借鉴。

  8. Docker搭建自己的PHP开发环境

    本文给大家介绍的是如何在docker中搭建一个PHP的开发环境,将用 zPhal-dockerfiles 做为例子,有需要的小伙伴可以参考下

  9. 安装docker和docker-compose实例详解

    在本篇文章里小编给大家分享的是关于安装docker和docker-compose的具体实例和代码,需要的朋友们可以学习下。

  10. 一步步教你利用Docker设置Node.js

    这篇文章主要介绍了利用Docker设置Node.js的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

随机推荐

  1. 在airgapped(离线)CentOS 6系统上安装yum软件包

    我有一个CentOS6系统,出于安全考虑,它已经被空气泄漏.它可能从未连接到互联网,如果有,它很长时间没有更新.我想将所有.rpm软件包放在一个驱动器上,这样它们就可以脱机安装而无需查询互联网.但是,我在测试VM上遇到的问题是,即使指定了本地路径,yum仍然会挂起并尝试从在线存储库进行更新.另外,有没有办法使用yum-utils/yumdownloader轻松获取该包的所有依赖项和所有依赖项?目前

  2. centos – 命名在日志旋转后停止记录到rsyslog

    CentOS6.2,绑定9.7.3,rsyslog4.6.2我最近设置了一个服务器,我注意到在日志轮换后,named已停止记录到/var/log/messages.我认为这很奇怪,因为所有日志记录都是通过rsyslog进行的,并且named不会直接写入日志文件.这更奇怪,因为我在更新区域文件后命名了HUPed,但它仍然没有记录.在我停止并重新启动命名后,记录恢复.这里发生了什么?

  3. centos – 显示错误的磁盘大小

    对于其中一个磁盘,Df-h在我的服务器上显示错误的空白区域:Cpanel表明它只有34GB免费,但还有更多.几分钟前,我删除了超过80GB的日志文件.所以,我确信它完全错了.fdisk-l/dev/sda2也显示错误:如果没有格式化,我该怎么做才能解决这个问题?并且打开文件描述符就是它需要使用才能做到这一点.所以…使用“lsof”并查找已删除的文件.重新启动写入日志文件的服务,你很可能会看到空间可用.

  4. 如何在centos 6.9上安装docker-ce 17?

    我目前正在尝试在centOS6.9服务器上安装docker-ce17,但是,当运行yuminstalldocker-ce时,我收到以下错误:如果我用跳过的标志运行它我仍然得到相同的消息,有没有人知道这方面的方法?

  5. centos – 闲置工作站的异常负载平均值

    我有一个新的工作站,具有不寻常的高负载平均值.机器规格是:>至强cpu>256GB的RAM>4x512GBSSD连接到LSI2108RAID控制器我从livecd安装了CentOS6.564位,配置了分区,网络,用户/组,并安装了一些软件,如开发工具和MATLAB.在启动几分钟后,工作站负载平均值的值介于0.5到0.9之间.但它没有做任何事情.因此我无法理解为什么负载平均值如此之高.你能帮我诊断一下这个问题吗?

  6. centos – Cryptsetup luks – 检查内核是否支持aes-xts-plain64密码

    我在CentOS5上使用cryptsetupluks加密加密了一堆硬盘.一切都很好,直到我将系统升级到CentOS6.现在我再也无法安装磁盘了.使用我的关键短语装载:我收到此错误:在/var/log/messages中:有关如何装载的任何想法?找到解决方案问题是驱动器使用大约512个字符长的交互式关键短语加密.出于某种原因,CentOS6中的新内核模块在由旧版本创建时无法正确读取512个字符的加密密钥.似乎只会影响内核或cryptsetup的不同版本,因为在同一系统上创建和打开时,512字符的密钥将起作用

  7. centos – 大量ssh登录尝试

    22个我今天登录CentOS盒找到以下内容这是过去3天内的11次登录尝试.WTF?请注意,这是我从我的提供商处获得的全新IP,该盒子是全新的.我还没有发布任何关于此框的内容.为什么我会进行如此大量的登录尝试?是某种IP/端口扫描?基本上有4名匪徒,其中2名来自中国,1名来自香港,1名来自Verizon.这只发生在SSH上.HTTP上没有问题.我应该将罪魁祸首子网路由吗?你们有什么建议?

  8. centos – kswap使用100%的CPU,即使有100GB的RAM也可用

    >Linux内核是否应该足够智能,只需从内存中清除旧缓存页而不是启动kswap?

  9. centos – Azure将VM从A2 / 3调整为DS2 v2

    我正在尝试调整前一段时间创建的几个AzureVM,从基本的A3和标准A3到标准的DS2v2.我似乎没有能力调整到这个大小的VM.必须从头开始重建服务器会有点痛苦.如果它有所不同我在VM中运行CentOS,每个都有一个带有应用程序和操作系统的磁盘.任何人都可以告诉我是否可以在不删除磁盘的情况下删除VM,创建新VM然后将磁盘附加到新VM?

  10. centos – 广泛使用RAM时服务器计算速度减慢

    我在非常具体的情况下遇到服务器速度下降的问题.事实是:>1)我使用计算应用WRF>2)我使用双XeonE5-2620v3和128GBRAM(NUMA架构–可能与问题有关!

返回
顶部