我们有以下回购在我们的肠胃7.2服务器
如我们所见,我们将enabled=0设置为默认
more infra-update.repo
[infra-76-update]
name=infra 76 update
baseurl=http://linux_machine/infra-76
gpgcheck=0
enabled=0但是,如果我们想使用这个repo - infra-7.6,我们将使用下面的yum语法
yum --disablerepo=* --enablerepo=infra-76 update -y但我们得到了
Error getting repository data for infra-76, repository not found但是当我们设置enabled=1时,我们可以使用-( yum --disablerepo=* --enablerepo=infra-76 update -y )成功地完成yum的安装。
但问题是:
是否有可能启用回购作为yum --disablerepo=* --enablerepo=infra-76,而enabled=0 ??
注意-尽管回购配置中的参数是infra-76,但目标是安装rpm's from repo enabled=0
发布于 2020-11-17 18:11:37
您可以使用yum-config-manager (您可能需要安装yum-utils):
yum-config-manager --enable infra-76标志--disablerepo和--enablerepo暂时禁用/启用存储库(仅用于该命令,在本例中仅用于运行yum update一次)。
https://stackoverflow.com/questions/64880499
复制相似问题