centos6离线安装docker

该文详细记录了在RedHat6.8系统中进行Docker的离线安装过程,包括遇到的错误,如404错误、yum无法找到仓库、systemd相关问题以及cgroup的挂载错误。作者通过替换Linux镜像源,清除yum缓存,手动下载rpm包并强制安装,修改/etc/fstab,安装依赖组件,以及处理cgconfig服务的启动问题,最终成功安装Docker。

参考 RedHat 6.8 离线安装Docker (rpm包安装) - 神奇二进制 - 博客园 (cnblogs.com)

可参考,但本次安装未参考 CentOS6 完全离线安装Docker - 简书 (jianshu.com)

走了一遍,大雾 (1条消息) 离线安装Docker_洒家肉山大魔王的博客-优快云博客

在内网安装docker,一开始走了很多弯路,比如下载docker安装包,直接安装

1、替换linux镜像

^C[root@rocketmq-nameserver2 ~]# vi /etc/yum.repos.d/CentOS-Base.repo You have mail in /var/spool/mail/root [root@rocketmq-nameserver2 ~]# yum clean all 已加载插件:fastestmirror, refresh-packagekit, security Cleaning repos: base docker-ce-stable epel extras updates 清理一切 Cleaning up list of fastest mirrors [root@rocketmq-nameserver2 ~]# yum makecache 已加载插件:fastestmirror, refresh-packagekit, security Determining fastest mirrors epel/metalink | 4.7 kB 00:00 * epel: ftp.iij.ad.jp base | 3.7 kB 00:00 base/group_gz | 242 kB 00:00 base/filelists_db | 6.4 MB 00:01 base/primary_db | 4.7 MB 00:00 base/other_db | 2.8 MB 00:00 https://download.docker.com/linux/centos/6/x86_64/stable/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" 尝试其他镜像。 To address this issue please refer to the below knowledge base article https://access.redhat.com/articles/1320623 If above article doesn't help to resolve this issue please open a ticket with Red Hat Support. 错误:Cannot retrieve repository metadata (repomd.xml) for repository: docker-ce-stable. Please verify its path and try again [root@rocketmq-nameserver2 ~]# yum repolist 已加载插件:fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile epel/metalink | 4.7 kB 00:00 * epel: ftp.iij.ad.jp https://download.docker.com/linux/centos/6/x86_64/stable/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" 尝试其他镜像。 To address this issue please refer to the below knowledge base article https://access.redhat.com/articles/1320623 If above article doesn't help to resolve this issue please open a ticket with Red Hat Support. https://download.docker.com/linux/centos/6/x86_64/stable/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" 尝试其他镜像。 epel | 4.7 kB 00:00 epel/primary_db | 6.1 MB 00:01 extras | 3.4 kB 00:00 extras/pr

相信好多人都在用yum时候,安装不好用,不是mirror找不到文件,就是rpm命令乱套。所以研究了离线安装。 准备: 1、已安装linux (以centos7为例) 2、离线安装包: ①、docker-engine-1.7.1-1.el7.centos.x86_64.rpm(可从以下链接下载http://www.oschina.net/news/64267/docker-1-7-1-final,centos7对应下载链接: https://get.docker.com/rpm/1.7.1 ... 7.centos.x86_64.rpm) 2015-12-3更新rpm源:https://yum.dockerproject.org/repo/main/centos/7/Packages/ ②、依赖组件cgroup: libcgroup-0.41-8.el7.x86_64.rpm libcgroup-devel-0.41-8.el7.x86_64.rpm libcgroup-pam-0.41-8.el7.x86_64.rpm libcgroup-tools-0.41-8.el7.x86_64.rpm(可从以下链接下载,或参考附件http://mirrors.163.com/centos/7/os/x86_64/Packages/) 1、winscp以root用户登录linux主机,将docker及libcgroup复制到/tmp目录,下载资源里已经都提供好 2、Xshell登录linux主机,进入tmp目录,显示当前文件: $ cd /tmp/ $ ls docker-engine-1.7.1-1.el7.centos.x86_64.rpm libcgroup-0.41-8.el7.x86_64.rpm libcgroup-devel-0.41-8.el7.x86_64.rpm libcgroup-pam-0.41- 8.el7.x86_64.rpm libcgroup-tools-0.41-8.el7.x86_64.rpm 3、先安装组件依赖,临时切换root用户 $ su Password: # rpm -ivh libcgroup-* warning: libcgroup-0.41-8.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:libcgroup-0.41-8.el7 ################################# [ 25%] 2:libcgroup-devel-0.41-8.el7 ################################# [ 50%] 3:libcgroup-pam-0.41-8.el7 ################################# [ 75%] 4:libcgroup-tools-0.41-8.el7 ################################# [100%] 如果提示key ID f4a80eb5: NOKEY,不让装,使用这个参数试试 --nodeps 4、安装docker主程序 # rpm -ivh docker-engine-1.7.1-1.el7.centos.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:docker-engine-1.7.1-1.el7.centos ################################# [100%] 文件夹下还有:docker-engine-1.7.1-1.el6.x86_64.rpm 这个如果是centos6的时候用 5、启动docker服务并查看docker版本 # service docker start Starting docker (via systemctl): [ OK ] # docker -v Docker version 1.7.1, build
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值