1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | 第一步:安装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 ~]# |