Chapter 14

INSTALLING AND UPDATING SOFTWARE PACKAGES

Redhat spesific commands:

# register a system to a Red Hat account:
subscription-manager register --username=yourusername --password=yourpassword

# view available subscriptions:
subscription-manager list --available | less

# view available subscriptions:
subscription-manager attach --auto # or
subscription-manager attach --pool=PoolID

# view consumed subscription:
subscription-manager list --consumed

# unregister a systems:
subscription-manager unregister

RPM queries:

rpm [option] [filename]
-q     Display the version of NAME installed on the system
-qa    List all RPM packages currently installed
-qf    Find out what package provides FILENAME
-qi    Display detailed information about a package
-ql    List all files included in a package
-qc    List configuration files included in a package
-qd    List documentation files included in a package
-qp    Get info about downloaded package
-q --scripts
-q --changelog

# to install .rpm package:
rpm -ivh wonderwidgets-1.0-4.x86_64.rpm
-i     Install packages
-v     Verbose
-h     Print hash

# to extract package without installing:
rpm2cpio wonderwidgets-1.0-4.x86_64.rpm | cpio -idv

# to list files in package:
rpm2cpio rhcsa-script-1.0.0-1.noarch.rpm | cpio -tv

# to extract only files with .txt extension:
rpm2cpio wonderwidgets-1.0-4.x86_64.rpm | cpio -id "*txt"

yum

enabling redhat software repositories

MANAGING PACKAGE MODULE STREAMS

Last updated

Was this helpful?