Package Management with RPM, DNF/YUM, Oracle Repositories, and ULN
This domain covers the two-layer packaging model on Oracle Linux: low-level RPM queries and verification, DNF transactions and module streams, and where packages come from - public yum.oracle.com repositories versus the Unbreakable Linux Network (ULN).
RPM below DNF
- Database lives in
/var/lib/rpm. Key queries:rpm -qa,rpm -qi,rpm -ql,rpm -qf /usr/sbin/semanage,rpm -qp --scripts pkg.rpm,rpm -V openssh-server. rpm -Uvhinstalls files but resolves no dependencies and ignores repositories - prefer DNF for anything that has dependencies.- Trust chain:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-oraclemakesgpgcheck=1succeed.
DNF operations
dnf install,dnf remove,dnf provides "*/bin/semanage",dnf repoquery -l pkg,dnf history undo 12,dnf clean all,dnf --enablerepo=ol9_addons install ....- Modules (OL8/OL9):
dnf module list nodejs,dnf module enable nodejs:18,dnf module install nodejs:18,dnf module reset nodejs. - Config:
/etc/dnf/dnf.conf(gpgcheck=1,installonly_limit=3) and/etc/yum.repos.d/*.repo;dnf config-manager --set-enabled ol9_addonstoggles a repo. - On OL8 and later
yumis a symlink todnf.
Oracle repositories and ULN
- Public repository IDs follow patterns such as
ol9_baseos_latest,ol9_appstream,ol9_addons,ol9_UEKR7,ol8_developer_EPEL,ol8_ksplice. BaseOS plus AppStream is the minimum usable set;kernel-uekupdates come from the UEK repository. - ULN (uln.oracle.com) is entitlement-based: a system is registered, associated with channels and errata, and receives update notifications. Public yum.oracle.com is free but carries no support entitlement or errata tracking.
Worked example
An application needs Node.js 18, but dnf install nodejs offers 16. Run dnf module list nodejs, then dnf module enable nodejs:18, then install; verify with node -v and dnf module list --installed. Reasoning: the module stream, not the package name, selects the version.
Traps
rpm -e --nodepsleaves broken dependency chains.- Enabling a stream after a non-modular package of the same name is installed fails until it is removed or reset.
- Forgetting to import the GPG key produces "Public key not installed" failures.
- After switching repository content,
dnf distro-syncis safer than a blinddnf update.