一、centos6.6安装Docker 1.7.1

3 篇文章 0 订阅
1 篇文章 0 订阅

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, refresh-packagekit, 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, refresh-packagekit, 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



安装完成!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 适合毕业设计、课程设计作业。这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。 所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答!

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值