我有Linux红帽子机器7.2版。
我在服务器- starmachine上使用本地存储库,以便通过yum安装。
root@test:/etc/yum.repos.d # more redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
#
root@test:/etc/yum.repos.d # more prv.repo
[localbase]
name=Red Hat Enterprise Linux
baseurl=http://starmachine/mnt/SO/ver/search/yum
enabled=1
gpgcheck=0
[updates]
name=Red Hat Enterprise Linux
baseurl=http://starmachine/mnt/SO/yum/lin/x86_64/updates
enabled=1
gpgcheck=0我需要做哪些修改(在哪些文件中)才能通过yum从internet而不是从本地存储库安装rpm并从红帽子站点下载rpm。
有可能吗?
test:~ # subscription-manager repos --list
This system has no repositories available through subscriptions.发布于 2016-03-28 22:55:41
您可以使用百胜-配置经理向在线存储库(特别是.repo文件)添加一个在线存储库,条件是您的url:
yum-config-manager --add-repo repository_url
yum-config-manager --enable repository其中repository_url是.repo文件的url,repository是使用yum repolist all命令可以找到的唯一存储库id。
我相信,只要您有一个RHEL订阅,您保证访问RHEL存储库,您可以通过yum访问。根据RHEL7 7文档中的页面,
当系统在Red订阅管理中注册到基于证书的内容传递网络(CDN)时,Red订阅管理器工具将用于管理/etc/yum.Storage.d/redhat.repo文件中的存储库。
因此,如果您想访问RHEL repos,您将需要使用这些工具。您可以在网上的RHEL文档中找到更多关于它们的信息( RHEL 7的文档,系统管理员指南,5.2节:管理软件仓库)。对于RHEL 7,您应该能够这样做:
subscription-manager repos --list
subscription-manager repos --enable repository第一个命令显示您的订阅为您提供的RHEL存储库,后者支持其中的一个。
编辑:基于此输出:
test:~ # subscription-manager repos --list
This system has no repositories available through subscriptions.您的系统似乎没有活动订阅。如果您想获得RedHat订阅,则需要向RedHat注册并购买一个(注释中的链接)。
如果您没有访问这些存储库的权限,并且不愿意购买RHEL订阅,您可以始终安装一个CentOS存储库,因为这两个库都是从相同的源构建的,因此它们的包应该是兼容的(不过,这里使用您自己的判断;RHEL存储库更好)。您可以确定哪个版本的CentOS与CentOS wiki页面上的特定安装兼容(下载部分,指向底部;您的版本应该是CentOS 7 (1511)),然后使用“树”链接访问rpms集合。
您可以在附加资源CentOS存储库下的CentOS wiki页面上找到有关CentOS存储库的更多信息。
https://unix.stackexchange.com/questions/272674
复制相似问题