首页

关于如何centos系统下通过ssh命令安装docker虚拟应用容器详细操作步骤说明

标签:docker安装,虚拟机,vm     发布时间:2018-08-11   

一、前言

关于Centos操作系统的ssh命令行终端安装docker应用虚拟容器,并加服务配置为开机启动,详情安装过程参见下面操作步骤。

二、操作步骤

1、下载安装远程版本

[root@raid2t 桌面]# rpm -Uvh http://ftp.riken.jp/Linux/fedora/epel/6Server/x86_64/epel-release-6-8.noarch.rpm@b@Retrieving http://ftp.riken.jp/Linux/fedora/epel/6Server/x86_64/epel-release-6-8.noarch.rpm@b@warning: /var/tmp/rpm-tmp.elGbWF: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY@b@Preparing...                ########################################### [100%]@b@   1:epel-release           ########################################### [100%]

2. yum安装

[root@raid2t 桌面]# yum  install  -y  docker-io@b@已加载插件:fastestmirror, refresh-packagekit, security@b@设置安装进程@b@Determining fastest mirrors@b@epel/metalink                                                                     | 7.1 kB     00:00     @b@ * base: mirrors.aliyun.com@b@ * epel: mirrors.ustc.edu.cn@b@ * extras: mirrors.aliyun.com@b@ * updates: mirrors.aliyun.com@b@epel                                                                              | 3.2 kB     00:00     @b@epel/primary                                                                      | 3.2 MB     00:05     @b@epel                                                                                         12518/12518@b@解决依赖关系@b@--> 执行事务检查@b@---> Package docker-io.x86_64 0:1.7.1-2.el6 will be 安装@b@--> 处理依赖关系 lxc,它被软件包 docker-io-1.7.1-2.el6.x86_64 需要@b@--> 执行事务检查@b@---> Package lxc.x86_64 0:1.0.11-1.el6 will be 安装@b@--> 处理依赖关系 lua-lxc(x86-64) = 1.0.11-1.el6,它被软件包 lxc-1.0.11-1.el6.x86_64 需要@b@--> 处理依赖关系 lua-alt-getopt,它被软件包 lxc-1.0.11-1.el6.x86_64 需要@b@--> 处理依赖关系 liblxc.so.1()(64bit),它被软件包 lxc-1.0.11-1.el6.x86_64 需要@b@--> 执行事务检查@b@---> Package lua-alt-getopt.noarch 0:0.7.0-1.el6 will be 安装@b@---> Package lua-lxc.x86_64 0:1.0.11-1.el6 will be 安装@b@--> 处理依赖关系 lua-filesystem,它被软件包 lua-lxc-1.0.11-1.el6.x86_64 需要@b@---> Package lxc-libs.x86_64 0:1.0.11-1.el6 will be 安装@b@--> 执行事务检查@b@---> Package lua-filesystem.x86_64 0:1.4.2-1.el6 will be 安装@b@--> 完成依赖关系计算@b@@b@依赖关系解决@b@@b@=========================================================================================================@b@ 软件包                       架构                 版本                         仓库                大小@b@=========================================================================================================@b@正在安装:@b@ docker-io                    x86_64               1.7.1-2.el6                  epel               4.6 M@b@为依赖而安装:@b@ lua-alt-getopt               noarch               0.7.0-1.el6                  epel               6.9 k@b@ lua-filesystem               x86_64               1.4.2-1.el6                  epel                24 k@b@ lua-lxc                      x86_64               1.0.11-1.el6                 epel                16 k@b@ lxc                          x86_64               1.0.11-1.el6                 epel               124 k@b@ lxc-libs                     x86_64               1.0.11-1.el6                 epel               257 k@b@@b@事务概要@b@=========================================================================================================@b@Install       6 Package(s)@b@@b@总下载量:5.0 M@b@Installed size: 20 M@b@下载软件包:@b@(1/6): docker-io-1.7.1-2.el6.x86_64.rpm                                           | 4.6 MB     00:07     @b@(2/6): lua-alt-getopt-0.7.0-1.el6.noarch.rpm                                      | 6.9 kB     00:00     @b@(3/6): lua-filesystem-1.4.2-1.el6.x86_64.rpm                                      |  24 kB     00:00     @b@(4/6): lua-lxc-1.0.11-1.el6.x86_64.rpm                                            |  16 kB     00:00     @b@(5/6): lxc-1.0.11-1.el6.x86_64.rpm                                                | 124 kB     00:00     @b@(6/6): lxc-libs-1.0.11-1.el6.x86_64.rpm                                           | 257 kB     00:00     @b@---------------------------------------------------------------------------------------------------------@b@总计                                                                     631 kB/s | 5.0 MB     00:08     @b@warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY@b@Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6@b@Importing GPG key 0x0608B895:@b@ Userid : EPEL (6) <epel@fedoraproject.org>@b@ Package: epel-release-6-8.noarch (installed)@b@ From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6@b@运行 rpm_check_debug @b@执行事务测试@b@事务测试成功@b@执行事务@b@Warning: RPMDB altered outside of yum.@b@  正在安装   : lxc-libs-1.0.11-1.el6.x86_64                                                          1/6 @b@  正在安装   : lua-filesystem-1.4.2-1.el6ser.x86_64                                                     2/6 @b@  正在安装   : lua-lxc-1.0.11-1.el6.x86_64                                                           3/6 @b@  正在安装   : lua-alt-getopt-0.7.0-1.el6.noarch                                                     4/6 @b@  正在安装   : lxc-1.0.11-1.el6.x86_64                                                               5/6 @b@  正在安装   : docker-io-1.7.1-2.el6.x86_64                                                          6/6 @b@  Verifying  : lxc-1.0.11-1.el6.x86_64                                                               1/6 @b@  Verifying  : lua-lxc-1.0.11-1.el6.x86_64                                                           2/6 @b@  Verifying  : lxc-libs-1.0.11-1.el6.x86_64                                                          3/6 @b@  Verifying  : docker-io-1.7.1-2.el6.x86_64                                                          4/6 @b@  Verifying  : lua-alt-getopt-0.7.0-1.el6.noarch                                                     5/6 @b@  Verifying  : lua-filesystem-1.4.2-1.el6.x86_64                                                     6/6 @b@@b@已安装:@b@  docker-io.x86_64 0:1.7.1-2.el6                                                                         @b@@b@作为依赖被安装:@b@  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.11-1.el6@b@  lxc.x86_64 0:1.0.11-1.el6           lxc-libs.x86_64 0:1.0.11-1.el6     @b@@b@完毕!

3. 启动并设置为开机启动

[root@raid2t 桌面]# service  docker  start@b@Starting docker:	                                   [确定]@b@[root@raid2t 桌面]# chkconfig  docker  on@b@[root@raid2t 桌面]# chkconfig  docker  --list@b@docker         	0:关闭	1:关闭	2:启用	3:启用	4:启用	5:启用	6:关闭
<<热门下载>>