第1个回答 2018-06-28
Resolution
注意: 在 Red Hat Enterprise Linux 5 之后,由于 yum 能正确更新本地 yum 数据库, 所以相较于 yum,我们推荐您使用 rpm。
如果您想安装某 RPM 包,您的系统里必需有这个要安装的 RPM 软件包文件。大多数人会从网站上下载 RPM 包。红帽客户门户网站会提供官方发行的所有 RPM 包。
rpm 主要用到以下两个参数用来安装或者升级 RPM 包。
-i 用来安装一个新的包。为了防止新内核无法启动,请用这个参数来安装及升级内核。
-U 用来升级 RPM 包,但是如果这个 RPM 包不在 RPM 数据库,则它会安装该包。
在 RPM 的 man 手册里您可以查到 rpm 的其它参数及用法。请在命令行里输入 man rpm 。以下是关于 -i 以及 -U 的说明:
Raw
INSTALL AND UPGRADE OPTIONS
The general form of an rpm install command is
rpm {-i|--install} [install-options] PACKAGE_FILE ...
This installs a new package.
The general form of an rpm upgrade command is
rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...
This install the package or upgrades the package currently installed to a newer
version. This is the same as install, except all other version(s) of
the package are removed after the new package is installed.本回答被网友采纳