Add an internal YUM repository.
Create a separate persistent .repo file rather than changing the global configuration.
Which path is the conventional location?
Individual YUM repository definitions normally live in /etc/yum.repos.d/*.repo. /etc/yum.conf contains the main YUM settings.
Detailed explanation
/etc/yum.repos.d/internal.repoCorrect. /etc/yum.repos.d/internal.repo is the conventional repository-definition path.
Correct. /etc/yum.repos.d/internal.repo is the conventional repository-definition path.
/etc/yum.conf.d/internal.confIncorrect. yum.conf.d is not the standard directory for repository definitions.
Incorrect. yum.conf.d is not the standard directory for repository definitions.
/var/lib/rpm/internal.repoIncorrect. /var/lib/rpm stores the RPM database, not .repo files.
Incorrect. /var/lib/rpm stores the RPM database, not .repo files.
/usr/lib/yum/internal.repoIncorrect. /usr/lib/yum is not the normal administrator configuration directory.
Incorrect. /usr/lib/yum is not the normal administrator configuration directory.
Try it yourself
An example you can run in a temporary verification environment.
find /etc/yum.repos.d -maxdepth 1 -name '*.repo' -print 2>/dev/nullExpected result
設定済み環境では.repoファイル一覧。変更は行わないKey points
- repos.d holds individual definitions
- Use the .repo extension
- yum.conf is global configuration
Notes
- Environment: RPM系Linuxの標準YUM/DNF構成
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.