如果我没有订阅 redhat 用户,应该使用什么第三方 repo 在 redhat 中安装软件包。
我正在使用 redhat docker 镜像 registry.access.redhat.com/rhel7/rhel 。此图像不包含任何安装包。
我已经尝试了 net 中存在的所有选项,可能是它们没有更新。
My redhat version is 7.3
64 bit
and I am not subscribe to redhat .
So when ever i install any package it say
“此系统未注册到 Red Hat Subscription Management。您可以使用 subscription-manager 进行注册。”
并想从第三方存储库安装git到redhat。怎么能这样呢?
请参阅 url http://redhat-centos.blogspot.in/2013/06/configuring-centos-base-repo-for-redhat.html我正在添加信息,因为将来该 url 可能不存在。我们可以通过 . 一个正在运行的例子。我已经使用了可能是 EPEL,rpmforge 的 redhat 第三方存储库。他们也有很好的包裹。但是这样做你可以使用centos repo 指令来解决这个问题。
转到 /etc/yum.repo.d ,制作一个文件
CentOS-Base.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos6
在这个 /etc/pki/rpm-gpg 里面
添加创建文件 RPM-GPG-KEY-CentOS-7 并添加内容
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
然后看到 yum repolist all 会列出所有的repo,启用centos-base我们会激活
现在运行 yum install -y git。git是安装。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句