Centos7离线安装Docker小记
-
将Centos7的iso镜像包上传到服务器,挂载镜像,制作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] name=centos7 baseurl=file:///media/centos7 enabled=1 gpgcheck=0 ############################### yum clean all yum makecache
-
执行yum安装相关的依赖
yum -y install systemd-devel systemd-libs libseccomp device-mapper-libs
-
离线安装三个包,按照以下顺序安装
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
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
-
设置docker为开机启动并且启动docker服务
systemctl enable docker.service systemctl start docker.service
网友评论