在RHEL 7 Linux服务器上安装Docker的问题 [英] Issues installing Docker on RHEL 7 Linux Server

查看:78
本文介绍了在RHEL 7 Linux服务器上安装Docker的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在不断地遇到这个问题,由于我完全被困住了,最终需要一些帮助.

我刚刚可以访问RHEL EC2 Linux服务器,而我只是在尝试安装Docker.最近,这个过程非常痛苦.尝试遵循在线提到的过程时,出现大量的404 HTTP Not Found错误

根据

第三次尝试 : https://computingforgeeks.com/install-docker-ce-on-rhel-7-linux/

本文的一部分建议运行以下两个命令:

  sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm须藤yum install -y yum-utils device-mapper-persistent-data lvm2 

但是,这也不起作用:

 #yum install -y yum-utils device-mapper-persistent-data lvm2加载的插件:amazon-id,product-id,search-disabled-repos,subscription-manager该系统未在权利服务器上注册.您可以使用订阅管理器进行注册.https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml:[Errno 14] HTTPS错误404-未找到尝试其他镜子.要解决此问题,请参阅下面的知识库文章https://access.redhat.com/articles/1320623如果以上文章对解决此问题没有帮助,请在Red Hat支持下打开故障单.其中一个已配置的存储库发生故障(Docker CE Stable-x86_64),并且yum没有足够的缓存数据来继续.在这一点上唯一yum可以做的安全的事情是失败.有几种方法可以固定"工作.这:1.与上游联系以获取存储库,并让他们解决问题.2.重新配置baseurl/etc.对于存储库,指向工作中的上游的.如果您使用的是较新的版本,这通常会很有用发行版本超出了存储库支持的版本(以及先前发行版本的软件包仍然有效).3.在暂时禁用存储库的情况下运行命令百胜--disablerepo = docker-ce-stable ...4.永久禁用存储库,因此yum默认不会使用它.百胜然后将忽略存储库,直到您永久启用它再次使用--enablerepo作为临时用途:yum-config-manager-禁用docker-ce-stable或者subscription-manager存储库--disable = docker-ce-stable5.将失败的存储库配置为不可用(如果不可用).请注意,yum会尝试与存储库联系.当它运行大多数命令时,因此每次都必须尝试失败(因此,yum将会非常多慢点).如果这是一个非常临时的问题,通常这是一个很好的选择妥协:yum-config-manager --save --setopt = docker-ce-stable.skip_if_unavailable = true失败:来自docker-ce-stable的repodata/repomd.xml:[Errno 256]没有其他尝试的镜像.https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml:[Errno 14] HTTPS错误404-未找到 

这是我的 cat/etc/os-release 命令的输出

  NAME ="Red Hat Enterprise Linux服务器";VERSION ="7.9(Maipo)"ID ="rhel".ID_LIKE ="fedora"VARIANT =服务器"VARIANT_ID =服务器"VERSION_ID ="7.9"PRETTY_NAME ="Red Hat Enterprise Linux Server 7.9(Maipo)"ANSI_COLOR ="0; 31".CPE_NAME ="cpe:/o:redhat:enterprise_linux:7.9:GA:server"HOME_URL =" https://www.redhat.com/"BUG_REPORT_URL ="https://bugzilla.redhat.com/" 

任何帮助将不胜感激.此时似乎几乎不可能安装docker.

解决方案

从互联网上下载这3个软件包的最新版本,然后

  [root @ test_hostame docker19.03_rpm]#ll总计93904-rw-r--r-- 1个根30381608 1月20日18:19 containerd.io-1.3.9-3.1.el7.x86_64.rpm-rw-r--r-- 1个根目录25519432 1月20日18:19 docker-ce-19.03.14-3.el7.x86_64.rpm-rw-r--r-- 1个root根40247412 Jan 20 18:19 docker-ce-cli-19.03.14-3.el7.x86_64.rpm 

仅存在这3个软件包的文件夹中的运行命令

  yum localinstall * rpm 

肯定可以.如果没有,请分享您的错误.

I have been constantly running into this issue more and more lately, and finally need some assistance because I'm completely stuck.

I just got access to a RHEL EC2 Linux server and I am just simply trying to install Docker. This process has been extremely painful lately. Tons of 404 HTTP Not Found errors when trying to follow the processes mentioned online

According to https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html, you can just simply run one of the following two commands:

  • sudo amazon-linux-extras install docker
  • sudo yum install docker

However, neither one of these comands work, as shown in the output below:

[root@d8de679d27f2454 myuser]# sudo amazon-linux-extras install docker
sudo: amazon-linux-extras: command not found
[root@d8de679d27f2454 myuser]# yum install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root@d8de679d27f2454 myuser]#

Here is a list of things I've tried to do :

First Attempt (RE: How to install docker on Amazon Linux2)

The second answer proposed in that you can just run the following:

sudo yum update -y
sudo yum -y install docker

However, that doesn't work either, as shown in the output below:

[root@d8de679d27f2454 myuser]# yum update -y
Loaded plugins: amazon-id, search-disabled-repos
No packages marked for update
[root@d8de679d27f2454 myuser]# yum -y install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root@d8de679d27f2454 myuser]# 

Second Attempt: Installing via get.docker.com

When running curl https://get.docker.com | bash, that doesn't work either

Third Attempt: https://computingforgeeks.com/install-docker-ce-on-rhel-7-linux/

Part of this article suggests running the following two commands:

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y yum-utils device-mapper-persistent-data lvm2

However, that doesn't work either:

# yum install -y yum-utils device-mapper-persistent-data lvm2
Loaded plugins: amazon-id, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
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.



 One of the configured repositories failed (Docker CE Stable - x86_64),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=docker-ce-stable ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable docker-ce-stable
        or
            subscription-manager repos --disable=docker-ce-stable

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=docker-ce-stable.skip_if_unavailable=true

failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try.
https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

Here's the output of my cat /etc/os-release command

NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

Any help would be greatly appreciated. It seems nearly impossible to install docker at this point.

解决方案

Download latest version of these 3 packages from internet and

[root@test_hostame docker19.03_rpm]# ll
total 93904
-rw-r--r-- 1 root root 30381608 Jan 20 18:19 containerd.io-1.3.9-3.1.el7.x86_64.rpm
-rw-r--r-- 1 root root 25519432 Jan 20 18:19 docker-ce-19.03.14-3.el7.x86_64.rpm
-rw-r--r-- 1 root root 40247412 Jan 20 18:19 docker-ce-cli-19.03.14-3.el7.x86_64.rpm

run command in folder where only these 3 packages are present

yum localinstall *rpm

It is surely gonna work. If it doesnt, share your error.

这篇关于在RHEL 7 Linux服务器上安装Docker的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆