Centos6.5下安装Docker

2016-12-14 14:27:00
村里来的扫地僧
原创
2091

第一步:安装epel-release源


[root@localhost ~]# yum install -y epel-release
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.skyshe.cn
 * updates: mirrors.aliyun.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================
 Package                        Arch                     Version                Repository                Size
===============================================================================================================
Installing:
 epel-release                   noarch                   6-8                    extras                    14 k
Transaction Summary
===============================================================================================================
Install       1 Package(s)
Total download size: 14 k
Installed size: 22 k
Downloading Packages:
epel-release-6-8.noarch.rpm                                                             |  14 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : epel-release-6-8.noarch                                                                     1/1 
  Verifying  : epel-release-6-8.noarch                                                                     1/1 
Installed:
  epel-release.noarch 0:6-8                                                                                    
Complete!
[root@localhost ~]# 
第二步:安装Docker-io



[root@localhost ~]# yum install -y docker-io
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                                                                     | 4.5 kB     00:00     
 * base: mirrors.aliyun.com
 * epel: mirrors.opencas.cn
 * extras: mirrors.skyshe.cn
 * updates: mirrors.aliyun.com
epel                                                                                              | 4.3 kB     00:00     
epel/primary_db                                                                                   | 5.8 MB     00:53     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package docker-io.x86_64 0:1.7.1-2.el6 will be installed
--> Processing Dependency: xz for package: docker-io-1.7.1-2.el6.x86_64
--> 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
--> Processing Dependency: bridge-utils for package: docker-io-1.7.1-2.el6.x86_64
--> Running transaction check
---> Package bridge-utils.x86_64 0:1.2-10.el6 will be installed
---> Package libcgroup.x86_64 0:0.40.rc1-16.el6 will be installed
---> Package lxc.x86_64 0:1.0.8-1.el6 will be installed
--> Processing Dependency: lua-lxc(x86-64) = 1.0.8-1.el6 for package: lxc-1.0.8-1.el6.x86_64
--> Processing Dependency: lua-alt-getopt for package: lxc-1.0.8-1.el6.x86_64
--> Processing Dependency: liblxc.so.1()(64bit) for package: lxc-1.0.8-1.el6.x86_64
---> Package xz.x86_64 0:4.999.9-0.5.beta.20091007git.el6 will be installed
--> Processing Dependency: xz-libs = 4.999.9-0.5.beta.20091007git.el6 for package: xz-4.999.9-0.5.beta.20091007git.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.8-1.el6 will be installed
--> Processing Dependency: lua-filesystem for package: lua-lxc-1.0.8-1.el6.x86_64
---> Package lxc-libs.x86_64 0:1.0.8-1.el6 will be installed
--> Processing Dependency: rsync for package: lxc-libs-1.0.8-1.el6.x86_64
---> Package xz-libs.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be updated
---> Package xz-libs.x86_64 0:4.999.9-0.5.beta.20091007git.el6 will be an update
--> Running transaction check
---> Package lua-filesystem.x86_64 0:1.4.2-1.el6 will be installed
---> Package rsync.x86_64 0:3.0.6-12.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:
 bridge-utils                x86_64              1.2-10.el6                                      base               30 k
 libcgroup                   x86_64              0.40.rc1-16.el6                                 base              129 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.8-1.el6                                     epel               16 k
 lxc                         x86_64              1.0.8-1.el6                                     epel              122 k
 lxc-libs                    x86_64              1.0.8-1.el6                                     epel              255 k
 rsync                       x86_64              3.0.6-12.el6                                    base              335 k
 xz                          x86_64              4.999.9-0.5.beta.20091007git.el6                base              137 k
Updating for dependencies:
 xz-libs                     x86_64              4.999.9-0.5.beta.20091007git.el6                base               89 k
Transaction Summary
=========================================================================================================================
Install      10 Package(s)
Upgrade       1 Package(s)
Total download size: 5.7 M
Downloading Packages:
(1/11): bridge-utils-1.2-10.el6.x86_64.rpm                                                        |  30 kB     00:00     
(2/11): docker-io-1.7.1-2.el6.x86_64.rpm                                                          | 4.6 MB     00:51     
(3/11): libcgroup-0.40.rc1-16.el6.x86_64.rpm                                                      | 129 kB     00:00     
(4/11): lua-alt-getopt-0.7.0-1.el6.noarch.rpm                                                     | 6.9 kB     00:00     
(5/11): lua-filesystem-1.4.2-1.el6.x86_64.rpm                                                     |  24 kB     00:00     
(6/11): lua-lxc-1.0.8-1.el6.x86_64.rpm                                                            |  16 kB     00:00     
(7/11): lxc-1.0.8-1.el6.x86_64.rpm                                                                | 122 kB     00:00     
(8/11): lxc-libs-1.0.8-1.el6.x86_64.rpm                                                           | 255 kB     00:02     
(9/11): rsync-3.0.6-12.el6.x86_64.rpm                                                             | 335 kB     00:00     
(10/11): xz-4.999.9-0.5.beta.20091007git.el6.x86_64.rpm                                           | 137 kB     00:00     
(11/11): xz-libs-4.999.9-0.5.beta.20091007git.el6.x86_64.rpm                                      |  89 kB     00:00     
-------------------------------------------------------------------------------------------------------------------------
Total                                                                                     99 kB/s | 5.7 MB     00:58     
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 (@extras)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : xz-libs-4.999.9-0.5.beta.20091007git.el6.x86_64                                                      1/12 
  Installing : xz-4.999.9-0.5.beta.20091007git.el6.x86_64                                                           2/12 
  Installing : rsync-3.0.6-12.el6.x86_64                                                                            3/12 
  Installing : lxc-libs-1.0.8-1.el6.x86_64                                                                          4/12 
  Installing : lua-filesystem-1.4.2-1.el6.x86_64                                                                    5/12 
  Installing : lua-lxc-1.0.8-1.el6.x86_64                                                                           6/12 
  Installing : libcgroup-0.40.rc1-16.el6.x86_64                                                                     7/12 
  Installing : lua-alt-getopt-0.7.0-1.el6.noarch                                                                    8/12 
  Installing : lxc-1.0.8-1.el6.x86_64                                                                               9/12 
  Installing : bridge-utils-1.2-10.el6.x86_64                                                                      10/12 
  Installing : docker-io-1.7.1-2.el6.x86_64                                                                        11/12 
  Cleanup    : xz-libs-4.999.9-0.3.beta.20091007git.el6.x86_64                                                     12/12 
  Verifying  : lxc-libs-1.0.8-1.el6.x86_64                                                                          1/12 
  Verifying  : bridge-utils-1.2-10.el6.x86_64                                                                       2/12 
  Verifying  : lxc-1.0.8-1.el6.x86_64                                                                               3/12 
  Verifying  : xz-4.999.9-0.5.beta.20091007git.el6.x86_64                                                           4/12 
  Verifying  : docker-io-1.7.1-2.el6.x86_64                                                                         5/12 
  Verifying  : lua-lxc-1.0.8-1.el6.x86_64                                                                           6/12 
  Verifying  : lua-alt-getopt-0.7.0-1.el6.noarch                                                                    7/12 
  Verifying  : libcgroup-0.40.rc1-16.el6.x86_64                                                                     8/12 
  Verifying  : lua-filesystem-1.4.2-1.el6.x86_64                                                                    9/12 
  Verifying  : rsync-3.0.6-12.el6.x86_64                                                                           10/12 
  Verifying  : xz-libs-4.999.9-0.5.beta.20091007git.el6.x86_64                                                     11/12 
  Verifying  : xz-libs-4.999.9-0.3.beta.20091007git.el6.x86_64                                                     12/12 
Installed:
  docker-io.x86_64 0:1.7.1-2.el6                                                                                         
Dependency Installed:
  bridge-utils.x86_64 0:1.2-10.el6     libcgroup.x86_64 0:0.40.rc1-16.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.8-1.el6        lxc.x86_64 0:1.0.8-1.el6                     
  lxc-libs.x86_64 0:1.0.8-1.el6        rsync.x86_64 0:3.0.6-12.el6         xz.x86_64 0:4.999.9-0.5.beta.20091007git.el6 
Dependency Updated:
  xz-libs.x86_64 0:4.999.9-0.5.beta.20091007git.el6                                                        
Complete!
第三步:启动Docker



[root@localhost ~]# /etc/init.d/docker start
Starting cgconfig service:                                 [  OK  ]
Starting docker:	                                   [  OK  ]
[root@localhost ~]# 
第四步:查看进程



[root@localhost ~]# ps aux |grep docker
root      1237  0.0  0.0 103244   852 pts/0    S+   08:06   0:00 grep docker
[root@localhost ~]# 
发表评论
叁 减 零 =
评论通过审核后显示。