安装docker
Redhat centos 安装docker
1.检查内核(uname -a 内核版本 3.8以上 64位 ,推荐centos7.4)
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
2.检查device mapper (docker存储驱动器),为docker提供存储能力
[root@localhost devices]# ls -l /sys/class/misc/device-mapper
[root@localhost ~]# grep device-mapper /proc/devices
253 device-mapper
如果没有安装device mapper软件包,需要安装一下
[root@localhost ~]# yum install -y device-mapper
加载 device mapper模块
[root@localhost ~]# modprobe dm_mod
------centos6 安装docker--------------------
rpm安装
curl https://download.docker.com/linux/centos/docker-ce.repo -0/etc/yum.repos.d/docker.repo
yum install -Y docker-ce
1.更新 epel源
[root@localhost ~]# rpm -Uvh https://mirrors.tuna.tsinghua.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
2.安装docker
[root@localhost ~]# yum -y install docker
脚本安装
Docker安装
[root@localhost ~]#curl https://get.docker.com/ | sh
直接下载rpm包
wget https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz
https://download.docker.com/inux/centos/7/x86 64/stable/Packages/下载完,上传到linux下