Читать книгу Mastering Linux System Administration - Richard Blum - Страница 105
Working Directly with Packages
ОглавлениеThere may be some environments where your Linux server won't have Internet access to contact the repository to automatically download packages. For example, often high‐security environments block all network traffic except internal traffic. In these environments, you'll need a way to manually install or update software packages.
The main tool for working with .rpm
files is the rpm
program. The rpm
utility is a command‐line program to install, modify, and remove .rpm
software packages. Its basic format is as follows:
rpm action [OPTION] package
Table 5.1 describes the actions for the rpm
command.
TABLE 5.1: The rpm
Command Actions
SHORT | LONG | DESCRIPTION |
---|---|---|
‐e | ‐‐erase | Removes the specified package |
‐F | ‐‐freshen | Upgrades a package only if an earlier version already exists |
‐i | ‐‐install | Installs the specified package |
‐q | ‐‐query | Queries if the specified package is installed |
‐U | ‐‐upgrade | Installs or upgrades the specified package |
‐V | ‐‐verify | Verifies if the package files are present and the package's integrity |
The following sections show how to use the rpm
command to manually manage software packages.