mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-28 06:54:52 +00:00
Compare commits
2 commits
47a0f4e826
...
6c1324cfe3
Author | SHA1 | Date | |
---|---|---|---|
|
6c1324cfe3 | ||
|
91847941fa |
2 changed files with 23 additions and 2 deletions
|
@ -15,6 +15,27 @@ This section describes how to add, enable, or disable a software repository with
|
|||
|
||||
This section describes how to add software repositories with the `dnf config-manager` command.
|
||||
|
||||
=== For Fedora 40 or earlier (DNF 4)
|
||||
|
||||
* To add a new repository, do the following as `*root*`.
|
||||
|
||||
. Define a new repository by adding a new file with the `.repo` suffix to the [filename]`/etc/yum.repos.d/` directory. For details about various options to use in the `.repo` file, see the xref:f{MAJOROSVER}@fedora:system-administrators-guide:package-management/DNF.adoc#sec-Setting_repository_Options[Setting [repository\] Options] section in the System Administrator's Guide
|
||||
|
||||
. Add the repository with `--add-repo`, where *_repository_* is the file path:
|
||||
+
|
||||
[literal,subs="+quotes,attributes"]
|
||||
----
|
||||
dnf config-manager --add-repo `*_repository_*`
|
||||
----
|
||||
+
|
||||
For example:
|
||||
+
|
||||
----
|
||||
dnf config-manager --add-repo /tmp/fedora_extras.repo
|
||||
----
|
||||
|
||||
=== For Fedora 41 or later (DNF 5)
|
||||
|
||||
* To add a new repository, do the following as `*root*`.
|
||||
|
||||
. Define a new repository by adding a new file with the `.repo` suffix to the [filename]`/etc/yum.repos.d/` directory. For details about various options to use in the `.repo` file, see the xref:f{MAJOROSVER}@fedora:system-administrators-guide:package-management/DNF.adoc#sec-Setting_repository_Options[Setting [repository\] Options] section in the System Administrator's Guide
|
||||
|
|
|
@ -13,11 +13,11 @@ This section describes how to add software repositories with the `dnf config-man
|
|||
+
|
||||
[literal,subs="+quotes,attributes"]
|
||||
----
|
||||
dnf config-manager addrepo --from-repofile=`*_repository_*`
|
||||
dnf config-manager --add-repo `*_repository_*`
|
||||
----
|
||||
+
|
||||
Where *_repository_* is the path to the created `.repo` file, for example:
|
||||
+
|
||||
----
|
||||
dnf config-manager addrepo --from-repofile=/etc/yum.repos.d/fedora_extras.repo
|
||||
dnf config-manager --add-repo /etc/yum.repos.d/fedora_extras.repo
|
||||
----
|
||||
|
|
Loading…
Reference in a new issue