517 521




Using Linux:Managing Applications






-->















Previous
Table of Contents
Next




CHAPTER 30Managing Applications

By Sriranga Veeraraghaven

Managing Linux software packages with the rpm command
Installing, deleting, and upgrading software packages
Uninstalling software with the rpm command
Querying and verifying rpm packages
Using Red Hat’s glint X11 client for package management
Using the X11 xrpm client

Package Management with rpm

One of the most powerful and innovative utilities available in Red Hat Linux is rpm, the Red Hat package manager. It can be used to install, uninstall, upgrade, query, verify, and build software packages.
A software package build with rpm is an archive of files and some associated information, such as a name, a version, and a description. A few of the advantages of rpm packages over the traditional tar.gz method of software distribution are as follows:

•  Upgrading—A new version of the software can be installed without losing customization files.
•  Uninstalling—A software package that installs files in several locations can be cleanly removed.
•  Verification—After its installation, a package can be verified to be in working order.
•  Querying—Information about what package a file belongs to can be easily obtained.

In addition to these features, rpm is available for many flavors of Linux and UNIX, making it one of the emerging utilities for distributing software packages.

SEE ALSO

•  To learn more about installing other Linux packages, see page 628.
•  For more information about other software backup or archiving utilities for Linux, see page 542.



The rpm Command’s Major Modes and Common Options

Following are the major modes in which rpm can be run:

•  Install (rpm -i)
•  Uninstall (rpm -e)
•  Query (rpm -q)
•  Verify (rpm -V)

The options to invoke the major modes are given in parentheses. These major modes are covered in detail in subsequent sections.

All of these major modes understand the following options:

•  -vv Prints out all debugging information; this mode is useful for seeing what exactly RPM is doing.
•  --quiet Prints out very little information—only error messages.

In addition to these, there are a few other “minor” modes that are useful:


•  version The version mode is invoked as the following:


# rpm —version


This mode prints out a line containing version information, similar to the following:


RPM version 2.3.11


•  help The help mode prints out an extensive help message:


# rpm —help


•  showrc If a message is long, it is handy to have a large xterm to pipe the output to more. To get a shorter help message, just type the following:


# rpm


This prints out a usage message. The showrc mode prints out a list of variables that can be set in the files /etc/rpmrc and $HOME/.rpmrc:


# rpm &3151;showrc


The default values are adequate for most installations.
•  rebuilddb The rebuilddb option is used to rebuild the database that rpm uses to keep track of which packages are installed on a system. Although this option is rarely needed, it is invoked as follows:


# rpm &3151;rebuilddb



Installing Packages
One of the major uses of rpm is to install software packages. The general syntax of an rpm install command is as follows:


rpm -i [options] [packages]


options can be one of the common options given earlier or one of the install options covered in the following list, and packages is the name of one or more rpm package files. Some of the install options are listed in Table 30.1.
TABLE 30.1 rpm install options



Option
Description



-v
Prints out what rpm is doing.

-h or --hash
Prints out 50 hash marks (#) as the package is installed.

--percent
Prints out percentages as files are extracted from the package.

--test
Goes through a package install, but does not install anything; mainly used to catch conflicts.

--excludedocs
Prevents the installation of files marked as documentation, such as man pages.

--includedocs
Forces files marked as documentation to be installed; this is the default.

--nodeps
No dependency checks are performed before installing a package.

--replacefiles
Allows for installed files to be replaced with files from the package being installed.

--replacepkgs
Allows for installed packages to be replaced with the packages being installed.

--oldpackage
Allows for a newer version of an installed package to be replaced with an older version.

--Force
Forces a package to be installed.



When giving options to rpm, regardless of the mode, all the single-letter options can be lumped together in one block:


# rpm -i -v -h kernel-2.0.30-3.i386.rpm


This command is equivalent to the following:



# rpm -ivh kernel-2.0.30-3.i386.rpm


All options starting with -- must be given separately, however.
Now take a look at a few examples of installing rpm packages. The first example installs vim (the improved version of vi) from the following package:


vim-4.5-2.i386.rpm






Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
521 523
APAR 517
521,37,artykul
Leksykon podatków i opłat lokalnych 517 pytań i odpowiedzi
521 522
517 (2)
519 521
513 517
ReadMe (517)
2011 01 09 WIL Wyklad 17id 521
521 524

więcej podobnych podstron