0% found this document useful (0 votes)
119 views

RPM, Yum, and Tar

This document discusses three Linux package management tools: RPM, yum, and tar. It provides details on how RPM packages work, how to install, query, upgrade, and uninstall packages using RPM and yum. It also describes how the tar tool is used to archive multiple files into a single file for distribution or backup purposes.

Uploaded by

TrurlScribd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views

RPM, Yum, and Tar

This document discusses three Linux package management tools: RPM, yum, and tar. It provides details on how RPM packages work, how to install, query, upgrade, and uninstall packages using RPM and yum. It also describes how the tar tool is used to archive multiple files into a single file for distribution or backup purposes.

Uploaded by

TrurlScribd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

rpm, yum, and tar

Package management rpm


Package management with yum
The tar tool
Chapter 13
RPM - Red Hats Package Manager

Package management systems take all the various files


containing programs and data, documentation, and
configuration information, and place them in one specially
formatted file - a package file, with an extension of .rpm.

An RPM file, also known as a package, is a way of


distributing software so that it can be easily installed,
upgraded, queried, and deleted.
The advantage of having a package manager is that you do not
have to compile the application on your system to install it.
You simply need to have a compiled version of the package
usually called a pre-compiled binary
created by someone who is generally more knowledgeable about
compiling the package in its most optimized format.
You can then install this compiled package/application through
the package manager.
/usr/src/redhat/RPMS
Notice that in this directory, all hardware
platforms are represented
Package Identification
name-version-release.architecture.rpm.
A package label uniquely identifies each package
name: name describing packaged software
version: version of the software
release: the number of times the software has been
packaged using the same software version
Distribution: Distribution version number
architecture: hardware platform (eg. i386, ppc, x86_64)
rpm: extension
Example: eject-2.1.5-8.fc8.i386.rpm
Installation options
rpm i package
Example: rpm -i dosfstools-2.11-8.fc7.i386.rpm
Additional options
--test Tests installation & reports problems
-v Verbose install
-h or percent Displays progression bar or %
Example: rpm ih dosfstools-2.11-8.fc7.i386.rpm
Query options on installed packages
rpm q package_name
Displays full package name, if installed
Example: rpm -q grub

Additional options (combined with option q)


-a Lists all packages currently installed
Example: rpm -qa
-f filename Lists which package installed a file
Example: rpm qf /sbin/mkfs
-l package_name Lists files installed by package
Example: rpm ql grub
-i package_name
Display package information
Example: rpm qi grub-0.97-33 or rpm qi grub

-R package_name
display what package is required to be installed
beforehand? Some packages depend on capabilities that
are provided by other packages. If these dependencies
are not respected, rpm will not let you install the
package.
Example: rpm qR grub-0.97-33
Upgrading packages
rpm U package|
Used to upgrade an existing package: installs current version
of package and erases all previous versions.

Example: rpm U bash-3.2-20.fc8.i386.rpm

Note: Use this option instead of installation option to avoid


conflicts.
Uninstalling packages
rpm -e package_name
Uninstall/erase a package
Example: rpm e eject or rpm e eject-2.1.5-8

Note: before remove a package, make sure to check


dependencies and leaves packages that are required by other
software.
Yellowdog Updater Modified

Created by Terra Soft, ported to many Linux distributions


Used to manage software installation and update
Works with RPM packages, automatically installs or updates
dependent software packages.
Configuration file /etc/yum.conf
Updating packages
yum update
Used to update all packages
You can update individual packages by specifying the names of the
packages following the option update.

Installing packages
yum install package_name

Removing packages
yum remove package_name
The tape archive tool
Originally was used for backing up to tape
drives needed to be serial
No compression
Think of it as taking many files (and
directories) and sticking them together end-
to-end
tar <operation> [options] <destination> <source>
Example: tar cf stuff.tar ./source/*
Example: tar xvf stuff.tar
-c: Create Operations
-r: append
-x: extract
-t: list
-f: file(s) Options
-p: preserve permissions
-v: verbose
-z: gzip

You might also like