Chapter 8. Installing Software Using the RPM Package Manager
This chapter explains the Red Hat Package Manager (RPM), a tool that facilitates installing, uninstalling, and upgrading software for your Red Hat Linux system. The chapter explains how to use RPM to find the package associated with an application and how to quickly and easily install the package. It also explains how to use RPM to upgrade packages and query the status of installed packages.
An RPM package (or more simply, an
) is a file that contains executable programs, scripts, documentation, and other files needed by an application or software unit. RPM packages are
Figure 8-1. The structure of a package name
8.1 The Package Management Tool
Red Hat Enterprise Linux and Fedora Core feature a package management tool that's much easier to use than GnoRPM, the tool included in previous versions of Red Hat Linux. To launch the package management tool, choose System Settings
Add/Remove Applications from the main menu. Only the root user can manipulate packages. If you're not logged in as the root user, the tool helpfully prompts you for the root
Figure 8-2. Checking system package status
Figure 8-3. The Add or Remove Packages window
8.1.1 Installing Package Groups and Packages
To install a package package
Most package groups contain optional packages that you can install or omit, according to your preference. The numbers to the right of the package group name indicate how many of the optional packages are installed. If you've just specified that a package group should be installed, the numbers
To learn more about the optional packages associated with a package group, click the Details link. The Package Details window appears, as shown in Figure 8-4. This window provides checkboxes that you can use to specify which optional packages you want installed. If you can't see the list of package
Figure 8-4. The Editors Package Details window
8.1.2 Removing Package Groups and Packages
You can also delete package groups and packages by using the package management tool. To remove a package group, disable the checkbox associated with the package group. To remove a package,
8.1.3 Installing Packages from the Hard Disk
If you have several free gigabytes of disk storage, you may prefer to copy the Red Hat Linux installation media to your hard disk. Doing so avoids the need to insert CDs when installing packages.
To set up your system for installing packages from the hard disk, open a terminal window, become the root user, and issue the following command to create the directory /var/redhat-tree/RedHat :
mkdir -p /var/redhat-tree/RedHat
The -p flag enables you to create the directory and its parent directory in a single command. Without the flag, the command will fail because the /var/redhat-tree directory does not exist.
Next, mount installation CD 1 and copy the contents of the
cp -a /mnt/cdrom/RedHat/* /var/redhat-tree/RedHat
Finally, copy the files from installation CD 2, CD 3, and CD 4 to the same location.
To install packages, launch the package management tool by issuing the command:
The tool will no longer prompt you to insert a CD; instead, it will obtain package files from the /redhat-tree directory. To avoid typing this command to install packages, you can create a panel launcher or menu item, as explained in Chapter 5 and Chapter 6.