docker-安装

1. docekr-安装

docker版本
支持平台
centos7 安装docker

2. docekr版本

社区办(community Edition,简称:CE)
企业办(Enterprise Edition,简称:EE)

3. 支持平台

4.安装docker

4.1 关闭系统防火墙和selinux和firewalld

[root@test-2 ~]# /bin/systemctl disable firewalld
[root@localhost ~]# getenforce                 #查看selinux是否开启
Enforcing                                         #enforcing表示selinux开启的,
[root@test-2 ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g'  /etc/selinux/config      #修改配置文件,需要重启才后永久关闭
[root@test-2 ~]# setenforce 0      #临时关闭selinx
[root@test-2 ~]# getenforce      #查看是否关闭
Disabled

4.2 安装docker源

[root@test-2 ~]# yum install -y yum-utils device-mapper-persistent-data   lvm2

4.3 安装docker镜像源

[root@test-2 ~]#  yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo

4.4 安装docker

[root@test-2 ~]# yum install -y docker-ce

4.5 启动docker,设置开机启动

[root@test-2 ~]# /bin/systemctl start docker
[root@test-2 ~]# /bin/systemctl enable docker      #设置开机启动
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

猜你喜欢

转载自www.cnblogs.com/scajy/p/9963346.html