Linux for Programmers and Users

[Page 587]

14.7. Installing New Software

Installing new software or updates to existing software is an important task of a system administrator. Most Linux distributions use the Red Hat Package Manager (RPM) to install new software packages. Even those that don't (e.g., Debian, Slackware) provide their own tools that can read RPM-format package files. Linux software is almost always distributed as an RPM package file. Software can also be packaged using tar or cpio.

Often, new software for your Linux system will be available in an RPM file. Install an RPM package with the rpm utility:

Figure 14-11. The rpm utility

Utility: rpm -aiqU packageName

rpm installs or updates an RPM package in the file packageName depending on whether -i or -U is specified. If the -q option is specified, the system is queried to see if packageName is currently installed. If -q is used with -a, all packages installed on the system are listed.

RPM packages maintain dependency information, so when you attempt to install a package, if it depends on other packages that have not been installed, the installation fails and tells you what dependency is not met.

If you install your Linux system and later want to install a package that you did not install, it is fairly simple to go back to the CDs and find the proper package and install it and anything it depends on. RPM package files are usually named in the form packagename-version.rpm.

Категории