Linux系统安装docker,教你如何快速搭建环境
注意事项:Docker 要求 CentOS 系统的内核版本高于 3.10 通过 uname -r 命令查看你当前的内核版本安装步骤root账户登录,查看内核版本如下 uname -rhttp://p1-tt.byteimg.com/large/pgc-image/02fdc652182b4aae8b0e4df1fc31f25c?from=pc安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的 yum install -y yum-utils device-mapper-persistent-data lvm2http://p6-tt.byteimg.com/large/pgc-image/ac100028cf154e5d96759485c961a498?from=pc
我这个自己的centos 7 已经安装了大部分的软件包了设置yum源(选择其中一个)yum-config-manager --add-repo http://download.docker.com/linux/centos/docker-ce.repo(中央仓库)yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo(阿里仓库)http://p1-tt.byteimg.com/large/pgc-image/253399bf2a984baba634e23638c8fdec?from=pc
可以查看所有仓库中所有docker版本,并选择特定版本安装 yum list docker-ce --showduplicates | sort –rhttp://p1-tt.byteimg.com/large/pgc-image/f35a70fe464e43a690245380956490b8?from=pc
yum install docker-ce-版本号,我选的是docker-ce-18.03.1.ce-1.el7.centos,如下 yum install docker-ce-18.03.1.ce-1.el7.centoshttp://p3-tt.byteimg.com/large/pgc-image/d9bbebcfe4904100b5eac597d0935211?from=pc
启动Docker,命令:systemctl start docker,然后加入开机启动,如下 systemctl start docker systemctl enable docker docker versionhttp://p6-tt.byteimg.com/large/pgc-image/06421b651ad54167b6ea331beeec67ab?from=pc
这样就安装好了。
页:
[1]