(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{316:function(s,a,t){"use strict";t.r(a);var e=t(15),r=Object(e.a)({},(function(){var s=this,a=s._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h2",{attrs:{id:"安装-docker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#安装-docker"}},[s._v("#")]),s._v(" 安装 Docker")]),s._v(" "),a("h3",{attrs:{id:"使用-root-账户登录-centos-确保-yum-包更新到最新"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#使用-root-账户登录-centos-确保-yum-包更新到最新"}},[s._v("#")]),s._v(" 使用 "),a("code",[s._v("root")]),s._v(" 账户登录 "),a("code",[s._v("centos")]),s._v(" 确保 "),a("code",[s._v("yum")]),s._v(" 包更新到最新")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" yum update\n")])])]),a("h3",{attrs:{id:"安装需要的软件包-yum-util-提供-yum-config-manager-功能-另外两个是-devicemapper-驱动依赖的"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#安装需要的软件包-yum-util-提供-yum-config-manager-功能-另外两个是-devicemapper-驱动依赖的"}},[s._v("#")]),s._v(" 安装需要的软件包 "),a("code",[s._v("yum-util")]),s._v(" 提供 "),a("code",[s._v("yum-config-manager")]),s._v(" 功能，另外两个是 "),a("code",[s._v("devicemapper")]),s._v(" 驱动依赖的")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" yum "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("install")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[s._v("-y")]),s._v(" yum-utils device-mapper-persistent-data lvm2\n")])])]),a("h3",{attrs:{id:"设置-yum-源"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#设置-yum-源"}},[s._v("#")]),s._v(" 设置 "),a("code",[s._v("yum")]),s._v(" 源")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo\n")])])]),a("h3",{attrs:{id:"安装-docker-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#安装-docker-2"}},[s._v("#")]),s._v(" 安装 "),a("code",[s._v("Docker")])]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" yum "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("install")]),s._v(" docker-ce\n")])])]),a("h3",{attrs:{id:"启动并加入开机启动"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#启动并加入开机启动"}},[s._v("#")]),s._v(" 启动并加入开机启动")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" systemctl start "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("docker")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" systemctl "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("enable")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("docker")]),s._v("\n")])])]),a("h2",{attrs:{id:"安装-docker-compose"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#安装-docker-compose"}},[s._v("#")]),s._v(" 安装 docker-compose")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" yum "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[s._v("-y")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("install")]),s._v(" python-pip "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" pip3 "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("install")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[s._v("--upgrade")]),s._v(" pip "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" pip3 "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("install")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("docker-compose")]),s._v("\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]);