欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Linux服务器上安装Docker

程序员文章站 2024-03-13 16:44:03
...

一、查看内核版本

  1. 查看内核版本
uname -r
[[email protected]VM-0-16-centos ~]# uname -r
3.10.0-1127.13.1.el7.x86_64
  1. 更新yum
yum update

二、安装Docker

  1. 使用命令行安装Docker
 yum install -y docker-engine

安装成功之后查看docker版本

docker version
[[email protected]VM-0-16-centos ~]# docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      0be3e21/1.13.1
 Built:           Thu Nov 12 15:11:46 2020
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      0be3e21/1.13.1
 Built:           Thu Nov 12 15:11:46 2020
 OS/Arch:         linux/amd64
 Experimental:    false
  1. 启动Docker服务
systemctl start docker.service

3.设置开机自启动

systemctl enable docker
[[email protected]VM-0-16-centos ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
相关标签: Linux linux