How to install or updata RPM package ?
时间:2009-03-23 来源:sjhf
In order to install an RPM package you must first have the RPM you are trying to install on your system. Many people will download RPMs from a website and of course, Red Hat Network (RHN) provides all the RPM packages included in our distributions. There are two main flags that are used to install or upgrade RPM packages:
Usage and additional options can be found in the RPM man page. Type man rpm from the command line. Here is some information about the -i and -U flags:
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.
Examples: Note: These examples assume the packages are in a directory on your system. The below RPM commands are executed in the current working directory where the new RPM files reside.
· # ls
·
· kernel-2.4.21-15.0.2.EL
·
· 1:kernel ########################################### [100%]
· 1:kernel-smp ########################################### [100%]
· kernel-2.4.21-4.0.1.EL
· kernel-smp-2.4.21-4.0.1.EL
·
· mod_ssl-2.0.46-32.ent.3.i386.rpm
· httpd-2.0.46-32.ent
· # rpm -Uvh httpd-2.0.46-32.ent.3.i386.rpm mod_ssl-2.0.46-32.ent.3.i386.rpm
· 2:mod_ssl ########################################### [100%]
· httpd-2.0.46-32.ent.3
·
|
相关阅读 更多 +