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 ofyum
usednf
underneath. Both work.- A module is a set of packages that belong together for a specific version (aka stream) of a package.
yumdownloader
fromyum-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 belongsrpm -ql
list of files in packagerpm -qi
provides package information likeyum info
rpm -qd
show available documentationrpm -qc
show all configuration filesrpm -q --scripts
scripts used by the packagerpm -qp <package>
with previous options to query an individual packagerpm -qR
show dependencies for a specific packagerpm -V
shows which parts of a package has been modified since installationrpm -Va
verifies all installed packagesrpm -qa
list all installed packagesrepoquery
is similar torpm -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