Skip to content

A RHEL subscription allows to you to download software from Red Hat repositories.

yum and dnf

List: - yum search <word> - yum install <package> - yum remove <package> - yum [what]provides */<file> which package provides file - yum info <package> - yum list [all|installed] - yum group list - yum group info "<group name>" - yum group install <group> - yum update [<package>] - yum clean all - yum history [undo <number>] - yum module list [<package>] - yum module info [<package>][:3.30] - yum module provides <package> - yum module install [<package>][:<version>][/<profile>] - yum module install php:7.1/devel

Knowledge:

  • dnf is newer but newer versions of yum use dnf underneath. Both work.
  • A module is a set of packages that belong together for a specific version (aka stream) of a package.
  • yumdownloader from yum-utils can download a package.

Repositories

Create a /etc/yum.repos.d/program.repo with:

[tag]
name=repo
mirrorlist=https://
baseurl=https://
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/...

rpm

rpm installs .rpm packages.

  • rpm -qf find rpm package to which a file belongs
  • rpm -ql list of files in package
  • rpm -qi provides package information like yum info
  • rpm -qd show available documentation
  • rpm -qc show all configuration files
  • rpm -q --scripts scripts used by the package
  • rpm -qp <package> with previous options to query an individual package
  • rpm -qR show dependencies for a specific package
  • rpm -V shows which parts of a package has been modified since installation
  • rpm -Va verifies all installed packages
  • rpm -qa list all installed packages
  • repoquery is similar to rpm -q

Register RHEL

Register system

subscription-manger register

List available subscriptions

subscription-manger list --available

Automatically attach subscriptions

subscription-manger attach --auto

Get an overview

subscription-manger --consumed

Unregister

subscription-manger unregister

Files and folders

  • /etc/pki/product/ Red Hat products installed
  • /etc/pki/consumer/ identifies Red Hat account
  • /etc/pki/entitlement/ subscriptions attached
  • /etc/yum.repos.d/ repositories location