Docker当前发布的最新版本已经到了1.11,其官网上针对Centos的的安装需求如下:

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

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

  

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

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.-.el6.x86_64 # SMP Thu Jul :: UTC x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /etc/redhat-release
CentOS release 6.7 (Final)
[root@localhost ~]# docker
-bash: docker: command not found
[root@localhost ~]# yum install docker
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
base | 3.7 kB :
base/primary_db | 4.6 MB :
extras | 3.4 kB :
extras/primary_db | kB :
updates | 3.4 kB :
updates/primary_db | 5.2 MB :
No package docker available.
Error: Nothing to do
[root@localhost ~]# yum install docker-io
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Determining fastest mirrors
* base: mirrors.zju.edu.cn
* extras: mirrors.skyshe.cn
* updates: mirrors.zju.edu.cn
No package docker-io available.
Error: Nothing to do

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

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

[root@localhost ~]# 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.sA7VqQ: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [%]
:epel-release ########################################### [%]

  

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

[root@localhost ~]# yum install docker-io
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 5.3 kB :
* base: mirrors.zju.edu.cn
* epel: ftp.cuhk.edu.hk
* extras: mirrors.skyshe.cn
* updates: mirrors.zju.edu.cn
epel | 4.3 kB :
epel/primary_db | 5.9 MB :
Resolving Dependencies
--> Running transaction check
---> Package docker-io.x86_64 :1.7.-.el6 will be installed
--> Processing Dependency: lxc for package: docker-io-1.7.-.el6.x86_64
--> Processing Dependency: libcgroup for package: docker-io-1.7.-.el6.x86_64
--> Running transaction check
---> Package libcgroup.x86_64 :0.40.rc1-.el6_7 will be installed
---> Package lxc.x86_64 :1.0.-.el6 will be installed
--> Processing Dependency: lua-lxc(x86-) = 1.0.-.el6 for package: lxc-1.0.-.el6.x86_64
--> Processing Dependency: lua-alt-getopt for package: lxc-1.0.-.el6.x86_64
--> Processing Dependency: liblxc.so.()(64bit) for package: lxc-1.0.-.el6.x86_64
--> Running transaction check
---> Package lua-alt-getopt.noarch :0.7.-.el6 will be installed
---> Package lua-lxc.x86_64 :1.0.-.el6 will be installed
--> Processing Dependency: lua-filesystem for package: lua-lxc-1.0.-.el6.x86_64
---> Package lxc-libs.x86_64 :1.0.-.el6 will be installed
--> Running transaction check
---> Package lua-filesystem.x86_64 :1.4.-.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
docker-io x86_64 1.7.-.el6 epel 4.6 M
Installing for dependencies:
libcgroup x86_64 0.40.rc1-.el6_7 updates k
lua-alt-getopt noarch 0.7.-.el6 epel 6.9 k
lua-filesystem x86_64 1.4.-.el6 epel k
lua-lxc x86_64 1.0.-.el6 epel k
lxc x86_64 1.0.-.el6 epel k
lxc-libs x86_64 1.0.-.el6 epel k Transaction Summary
====================================================================================
Install Package(s) Total download size: 5.1 M
Installed size: M
Is this ok [y/N]: y
Downloading Packages:
(/): docker-io-1.7.-.el6.x86_64.rpm | 4.6 MB :
(/): libcgroup-0.40.rc1-.el6_7.x86_64.rpm | kB :
(/): lua-alt-getopt-0.7.-.el6.noarch.rpm | 6.9 kB :
(/): lua-filesystem-1.4.-.el6.x86_64.rpm | kB :
(/): lua-lxc-1.0.-.el6.x86_64.rpm | kB :
(/): lxc-1.0.-.el6.x86_64.rpm | kB :
(/): lxc-libs-1.0.-.el6.x86_64.rpm | kB :
----------------------------------------------------------------------------------------------
Total kB/s | 5.1 MB :
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 () <epel@fedoraproject.org>
Package: epel-release--.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS- Key (CentOS Official Signing Key) <centos--key@centos.org>
Package: centos-release--.el6.centos.12.3.x86_64 (@anaconda-CentOS-.x86_64/6.7)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-
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.-.el6.x86_64 /
Installing : lua-filesystem-1.4.-.el6.x86_64 /
Installing : lua-lxc-1.0.-.el6.x86_64 /
Installing : lua-alt-getopt-0.7.-.el6.noarch /
Installing : lxc-1.0.-.el6.x86_64 /
Installing : libcgroup-0.40.rc1-.el6_7.x86_64 /
Installing : docker-io-1.7.-.el6.x86_64 /
Verifying : lxc-libs-1.0.-.el6.x86_64 /
Verifying : libcgroup-0.40.rc1-.el6_7.x86_64 /
Verifying : lua-lxc-1.0.-.el6.x86_64 /
Verifying : lxc-1.0.-.el6.x86_64 /
Verifying : docker-io-1.7.-.el6.x86_64 /
Verifying : lua-alt-getopt-0.7.-.el6.noarch /
Verifying : lua-filesystem-1.4.-.el6.x86_64 / Installed:
docker-io.x86_64 :1.7.-.el6 Dependency Installed:
libcgroup.x86_64 :0.40.rc1-.el6_7
lua-alt-getopt.noarch :0.7.-.el6
lua-filesystem.x86_64 :1.4.-.el6
lua-lxc.x86_64 :1.0.-.el6
lxc.x86_64 :1.0.-.el6
lxc-libs.x86_64 :1.0.-.el6 Complete!
[root@localhost ~]# docker -v
Docker version 1.7., build 786b29d/1.7.

安装完成!

Centos6.7安装docker1.7.1的更多相关文章

  1. 1.centos6.8安装docker

    简介环境安装依赖安装步骤1.删除旧版本的docker2.安装docker2.1 yum安装docker2.2 tar安装2.3 在线脚本事实证明以上的安装方式都行不通 参考文档:https://doc ...

  2. vmware Centos6.6安装64位

    Centos6.6安装64位 必须开启BIOS中的虚拟化技术 首先开机进入BIOS,一般机器是按F2,我的T420是按F1,然后进入Security,Virtualization,选择Enable即可 ...

  3. Gitlab完美安装【CentOS6.5安装gitlab-6.9.2】

    摘要: 拆腾了几天,终于在今天找到了快速安装Gitlab的方法.CentOS6.5安装gitlab-6.9.2 参考网址:https://gitlab.com/gitlab-org/omnibus-g ...

  4. CentOS6.5安装Tomcat

    安装说明 安装环境:CentOS-6.4 安装方式:源码安装 软件:apache-tomcat-7.0.56.tar.gz 下载地址:http://tomcat.apache.org/download ...

  5. Centos6 yum安装openldap+phpldapadmin+TLS+双主配置

    原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%8 ...

  6. centos6.5安装oracle11g_2

    centos7安装oracle数据库不成功,换成centos6.5安装,可以安装成功,记录一下 安装系统时,主机名如果不是用localhost,安装成功后,要用主机名和ip做映射,修改/etc/hos ...

  7. CentOS6.6安装vmware workstation报错

    本人系统用的是centos6.6,安装了vmware workstation,启动后一直如下图报错,相关内核已经安装了的,哪位前辈如果解决过这样的问题,麻烦指点指点,小弟在此先谢过了.

  8. CentOS6.6安装virtualbox4.1.44

    本人用的是centos6.6,安装了virtualbox 4.1.44,启动后一直如上图报错,哪位前辈如果解决过这样的问题,麻烦指点指点,小弟在此先谢过了.

  9. [转]CentOS-6.3安装配置cmake

    CentOS-6.3安装配置cmake   zhoulf 2013-02-03 原创 安装说明 安装环境:CentOS-6.3安装方式:源码编译安装 软件:cmake-2.8.10.2.tar.gz下 ...

随机推荐

  1. [转载]How To Add Swap on Ubuntu 12.04

    How To Add Swap on Ubuntu 12.04 Aug 17, 2012  Linux Basics Ubuntu   About Linux Swapping Linux RAM i ...

  2. css 实现三角形的原理

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  3. 导入excle数据将excle数据插入到数据库

    实现功能是,用户可以直接导入对应数据,或者用户下载模板,填写数据,导入模板数据.easyui实现 前台页面 { text : '日清导入', iconCls : 'icon-print', handl ...

  4. boostrap折叠,jquery ui accordion同时打开多个标签

    http://caibaojian.com/bootstrap/javascript.html http://www.w3cschool.cc/jqueryui/example-accordion.h ...

  5. springmvc4+hibernate4+spring4注解一对多级联保存

    package com.h3c.zgc.user.entity; import java.util.HashSet; import java.util.Set; import javax.persis ...

  6. 杭电ACM 1197

    #include<stdio.h>main(){ int temp,i,t,sum10,sum12,sum16; for(i=1000;i<=9999;i++) { temp=i; ...

  7. 一道打印M的面试题

    public class Demo { /** * 平面图形题(二维数组) */ public static void main(String[] args) { int num = 25; int ...

  8. Maven问题总结:Eclipse中项目右键菜单中点击Maven->Update Projects时JDK被重置

    Eclipse中在项目右键菜单点击->Maven->Update Projects时,JDK总是切回 1.5 如果没有在Maven中配置过JDK版本,只是在Eclipse中项目的Prope ...

  9. ssh增加密匙登录

    使用要创建登录密匙的账号登录 生成密匙 #ssh-keygen -t rsa 生成时提示输入密码,如果不输入,则直接回车即可,如果输入,将在无密匙登陆时要求输入该密码 进入生成目录.ssh #cd ~ ...

  10. Flink - state

      public class StreamTaskState implements Serializable, Closeable { private static final long serial ...