Three basic software installations are covered here -- using the Red Hat Package Manager, compiling software using the standard GNU compilation method, and compiling and installing the software by hand. (From the book Linux Administration, A Beginner's Guide, third edition by Steven Graham and Steve Shah, McGraw-Hill/Osborne, 0072225629, 2002).
A great deal of your time will be spent keeping your Linux system up to date with the latest and greatest software. There are three basic methods to installing software on a Linux system. One, use the package manager for the distribution. This is typically the Red Hat Package Manager (RPM). Two, compile the software using the standard GNU compilation method. Three, compile and install the software by hand. We will cover these methods in this module.
When installing software, you typically need to be the root user. (Module 6 will cover how to change user IDs with the su command.) In a terminal window, just type su – root.
Use the Red Hat Package Manager
The Red Hat Package Manager’s primary function is to allow the installation and removal of files (typically, precompiled software). It is wonderfully easy to use, and several graphical interfaces have been built around it to make it even easier. Red Hat, Caldera, and other distributions have started using this tool to distribute their software. In fact, almost all of the software mentioned in this book is available in RPM form. The reason you’ll go through the process of compiling software yourself in other modules is so that you can customize the software to your system, as such customizations might not exist in an RPM.
An RPM file is a package that contains files needed for the software to function correctly. These files can be configuration files, binaries, and even pre and post scripts to run while installing the software.
NOTEIn this context, we are assuming that the RPM files contain precompiled binaries. Several groups, such as Red Hat, also make source code available as an RPM, but it is uncommon to download and compile source code in this fashion.
The RPM tool performs the installation and uninstallation of RPMs. The tool also maintains a central database of what RPMs you have installed and other information about the package.
In general, software that comes in the form of an RPM is less work to install and maintain than software that needs to be compiled. The tradeoff is that by using an RPM, you accept the default parameters supplied in the RPM. In most cases, these defaults are acceptable. However, if you need to be more intimately aware of what is going on with a service, you may find that compiling the source yourself will prove more educational about what package components exist and how they work together.
Assuming that all you want to do is install a simple package, RPM is perfect. There are several great resources for RPM packages, including the following:
Of course, if you are interested in more details about RPM itself, you can visit the RPM Web site at http://www.rpm.org/. RPM comes with Red Hat Linux (and derivatives) as well as Caldera Linux. If you aren’t sure if RPM comes with your distribution, check with your vendor.
NOTEAlthough the name of the package says “Red Hat,” the software can be used with other distributions as well. In fact, RPM has even been ported to other operating systems, such as Solaris and IRIX. The source code to RPM is open-source software, so anyone can take the initiative to make the system work for them.
This chapter is from Linux Administration, A Beginner's Guide, third edition, by Graham and Shah. (McGraw-Hill/Osborne, 2002, ISBN: 0072225629). Check it out at your favorite bookstore today.