如何使用命令行启用和禁用百胜存储库

发布于 2025-01-25 05:21:34 字数 248 浏览 4 评论 0原文

我正在尝试编辑yum.repos.d文件,以便禁用不需要的存储库,并在不使用VI编辑器的情况下启用了通缉备。每当我使用这种方法时,我都无法进行更改。有人知道我缺少什么吗?

请参阅下面:

yum-config-manager --disable \therepoid,anotherrepoid

注意:我不是从Yum.repos.d目录执行此操作

I'm attempting to edit the yum.repos.d file in order to disable unwanted repos and enable wanted repos without using the vi editor. Each time I use the method I know of it fails to make the changes. Does anyone know what I'm missing?

See Below:

yum-config-manager --disable \therepoid,anotherrepoid

Note: I'm not executing this from the yum.repos.d directory

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眉目亦如画i 2025-02-01 05:21:34

首先,您需要将命令作为root运行
然后,您应该获取回购列表:

yum repolist all

然后您可以通过repo_id从上一个命令中启用或禁用特定的repo(s)

yum-config-manager --enable repo_id

。 .com/documention/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-managing_yum_repositories“ rel =“ nofollow noreflow noreferrer”> redhat文档

First you need to run the command as root
Then you should get the list of repos:

yum repolist all

And then you can enable or disable particular repo(s) by repo_id from previous command

yum-config-manager --enable repo_id

For reference you can use RedHat documentation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文