Directory:
/etc/yum.repos.d/
<org>-<env>-<os><major>-<repo-purpose>.repo
networknuts-prod-rhel9-baseos.repo
networknuts-prod-rhel9-appstream.repo
networknuts-dev-rhel9-epel.repo
networknuts-test-rhel8-internal-tools.repo
-
Immediately tells you:
- Organization
- Environment
- OS version
- Repo content purpose
-
Scales cleanly when you have 20+ repos
-
Works well with configuration management tools (Ansible, Puppet)
Inside the file:
[networknuts-prod-rhel9-baseos]
name=NetworkNuts Production RHEL 9 BaseOS
baseurl=http://repo.networknuts.local/rhel/9/baseos/
enabled=1
gpgcheck=1
gpgkey=http://repo.networknuts.local/RPM-GPG-KEY-networknuts<org>-<env>-<os><major>-<component>
Example:
networknuts-prod-rhel9-baseos
networknuts-prod-rhel9-appstream
networknuts-dev-rhel9-epel
Keep repo IDs lowercase and avoid spaces.
In serious enterprise datacenters, the pattern is usually:
<env>-<os>-<version>-<component>
Example:
prod-rhel-9-baseos.repo
prod-rhel-9-appstream.repo
dev-rhel-9-epel.repo
Short, readable, scalable.
Add architecture only if required:
prod-rhel-9-baseos-x86_64.repo
prod-rhel-9-baseos-aarch64.repo
Usually not needed unless mixed-arch infra.
If you're mirroring Red Hat or EPEL internally:
prod-rhel-9-redhat-baseos.repo
prod-rhel-9-redhat-appstream.repo
prod-rhel-9-epel.repo
This helps differentiate:
- Vendor provided
- Internal curated
- Custom package repo
❌ repo1.repo
❌ internal.repo
❌ rhel.repo
❌ base.repo
These become impossible to manage at scale.