Chapter 2: Managing Software Flashcards
Package
A collection of files that are installed on the computer
Dependency Information
Lists other packages that are required to install a package.
RPM Package Manager (RPM)
- The most popular package manager in the Linux world.
- Cross-platform and supports any CPU architecture
Convention for naming RPM packages
packagename-a.b.c-x.arch.rpm
packagename
The name of the package
a.b.c
The package version number
x (as in packagename-a.b.c-x.arch.rpm)
The build/release number, representing changes made by the package maintainer.
arch (as in packagename-a.b.c-x.arch.rpm)
A code for the package’s architecture.
Architecture Code for x86 CPU
i386
If a package is independent of CPU, what is put in the arch field?
noarch
What is the architecture code for source RPMs?
src
Compatibility Issues between RPM-based Distributions
- Different package dependencies
- Difference in names of dependent packages
- Slightly different files it depends on
- Basically dependencies!
rpm [operation][options] [package-files|package-names]
Used to install or upgrade a package at the shell prompt
rpm -i
Installs a package; note that the system must not contain a package of the same name
rpm -U
Installs a new package or upgrades an existing one
rpm -f
or
rpm –freshen
Upgrades a package only if an earlier version already exists
rpm -q
Finds whether a package is installed, what files it contains, and so on
rpm -e
Uninstalls a package
rpm -b
Builds a binary package, given source code and configuration files
(moved to rpmbuild with RPM version 4.2)
rpm –rebuild
Builds a binary package, given source RPM file
moved to rpmbuild with RPM version 4.2
rpm –rebuilddb
Rebuilds the RPM database to fix errors
rpm –root [dir]
Modifies the Linux system having a root directory located at dir.
Used with any operation.
rpm –force
- Forces installation of a package even when it means overwriting existing files or packages.
- Used with -i, -U, -F
rpm -h
or
rpm–hash
- Displays a series of hash marks (#) to indicate the progress of the operation
- Used with -i, -U, -F
rpm -v
-Used in conjunction with the -h option to produce a uniform number of hash marks for each package
rpm –nodeps
- Specifies that no dependency checks be performed
- Used with -i, -U, -F, -e
rpm –test
- Checks for dependencies, conflicts, and other problems without actually installing the package
- Used with -i, -U, -F
rpm –prefix [path]
- Sets the installation directory to path.
- Used with -i, -U, -F
rpm -a
or
rpm -all
- Queries or verifies all packages
- Used with -q, -V
rpm -f file
or
rpm –file file
- Queries or verifies the package that owns file.
- Used with -q, -V
rpm -p [package-file]
- Queries the uninstalled RPM package-file
- Used with -q
rpm -qi
Displays extra package info, and used to verify the package has been installed correctly
rpm -R
or
rpm –requires
-Displays the packages and files on which this depends
rpm -l
or
rpm –list
- Displays the files contained in the package
- Used with -q