参考文章:https://blog.csdn.net/c851204293/article/details/89312139
1、制作离线yum源
将Centos7的iso镜像包(dvd完整版)上传到服务器,挂载镜像,制作yum源
mkdir -p /media/centos7/
mount ./CentOS-7-x86_64-DVD-1611.iso /media/centos7/
#内网网络环境可以清空一下仓库信息
rm -rf /etc/yum.repos.d/*.repo
vim /etc/yum.repos.d/centos7-localsource.repo
#########centos7-localsource.repo里面添加以下信息############
[centos7-localsource]
name=centos7
baseurl=file:///media/centos7
enabled=1
gpgcheck=0
###############################
yum clean all
yum makecache
2、执行yum安装相关的依赖
yum -y install systemd-devel systemd-libs libseccomp device-mapper-libs
3、离线安装三个包,按照以下顺序安装
libtool-ltdl-2.4.2-22.el7_3.x86_64
docker-ce-selinux-17.03.1.ce-1.el7.centos.noarch
docker-ce-17.03.1.ce-1.el7.centos.x86_64
image.png
yum install -y libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
yum install -y docker-ce-selinux-17.03.1.ce-1.el7.centos.noarch.rpm
yum install -y docker-ce-17.03.1.ce-1.el7.centos.x86_64.rpm
4、设置docker为开机启动,并且启动docker服务
systemctl enable docker.service
systemctl start docker.service
网友评论