.rpm

A .rpm installation package is a software archive file used to install, upgrade, remove, or manage software on Red Hat-based Linux operating systems.

Definition:

.rpm (Red Hat Package Manager) is an installation package format that contains:

  • Compiled binary files (run directly on the operating system)
  • Configuration files
  • Package description information (name, version, description, author…)
  • Dependency information (packages needed to run correctly)
  • Automatic scripts (run before/after installation/uninstallation)

Internal structure of .rpm package:

A .rpm file usually includes:

  • Header – contains metadata: package name, version, architecture, description…

  • Payload – main content includes:

  • Executable file

  • Library

  • Configuration

  • Script (pre/post install, pre/post uninstall)

Manage with what tool?

  • rpm – native tool, used for manual installation:
sudo rpm -ivh package.rpm
  • dnf / yum – used for dependency management, smarter installation:
sudo dnf install package.rpm

Example .rpm package:

htop-2.2.0-3.el8.x86_64.rpm
  • htop: software name
  • 2.2.0: version
  • 3.el8: build for RHEL 8
  • x86_64: 64-bit architecture