查看“Docker引擎的安装”的源代码
←
Docker引擎的安装
跳转至:
导航
,
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
==准备工作== ===防火墙规则配置=== [root@localhost ~]# iptables -F [root@localhost ~]# iptables -X [root@localhost ~]# iptables -Z [root@localhost ~]# /usr/sbin/iptables-save <nowiki># Generated by iptables-save v1.4.21 on Sat Nov 30 22:16:30 2019 *mangle :PREROUTING ACCEPT [198:17752] :INPUT ACCEPT [198:17752] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [84:10713]</nowiki> ===配置SELinux=== sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config reboot ===关闭Swap交换分区=== [root@localhost ~]# swapoff -a [root@localhost ~]# sed -i "s/\/dev\/mapper\/centos-swap/\#\/dev\/mapper\/centos-swap/g" /etc/fstab 查看Swap交换分区: [root@localhost ~]# free -m <nowiki>total used free shared buff/cache available Mem: 1990 130 1717 9 141 1700</nowiki> ===开启路由转发=== <nowiki>[root@localhost ~]# cat >> /etc/sysctl.conf << EOF > net.ipv4.ip_forward=1 > net.bridge.bridge-nf-call-ip6tables = 1 > net.bridge.bridge-nf-call-iptables = 1 > EOF</nowiki> [root@localhost ~]# modprobe br_netfilter [root@localhost ~]# sysctl -p 输出: <nowiki>net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1</nowiki> ==Docker引擎安装== ===安装依赖包=== yum install -y yum-utils device-mapper-persistent-data ===配置仓库=== yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo ===安装docker-ce=== 此处安装指定的Docker版本。 [root@localhost yum.repos.d]# yum list docker-ce --showduplicates | sort -r <nowiki>Loading mirror speeds from cached hostfile Loaded plugins: fastestmirror docker-ce.x86_64 3:19.03.5-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.4-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.3-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.2-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.0-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.9-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.8-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.7-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.6-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.5-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.4-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.3-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.2-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable docker-ce.x86_64 18.06.3.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.2.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable Available Packages </nowiki> 安装docker及对应的软件: yum install docker-ce-18.09.6 docker-ce-cli-18.09.6 containerd.io -y 如遇到错误:Error: Package: 3:docker-ce-18.09.6-3.el7.x86_64 (docker-ce-stable)Requires: container-selinux >= 2.9 需要执行以下命令: <nowiki>yum install policycoreutils-python wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm rpm -ivh container-selinux-2.107-3.el7.noarch.rpm</nowiki>
返回至
Docker引擎的安装
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息