001、内核
[root@PC1 ~]# cat /proc/version Linux version 3.10.0-957.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018
002、卸载(可选)
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine docker-ce
003、安装yum工具
[root@PC1 test]# yum install -y yum-utils device-mapper-persistent-data lvm2 --skip-broken
004、更新docker本地镜像源
[root@PC1 test]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
005、
sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
006、
[root@PC1 test]# yum makecache fast
007、
[root@PC1 test]# yum install -y docker-ce
008、关闭防火墙
[root@PC1 test]# systemctl stop firewalld [root@PC1 test]# systemctl disable firewalld [root@PC1 test]# systemctl status firewalld
009、启动docker
[root@PC1 test]# systemctl start docker [root@PC1 test]# systemctl status docker
010、测试docker命令
[root@PC1 test]# docker --version Docker version 24.0.1, build 6802122
参考:https://www.cnblogs.com/mengd/p/15574856.html
标签:安装,PC1,ce,centos7,yum,test,docker,root From: https://www.cnblogs.com/liujiaxin2018/p/17417100.html