In Linux, almost all software is installed, uninstalled, and managed through RPM. RPM is called RedhatPackageManager. it is proposed by Redhat to manage software packages in Linux. in addition to several core modules, almost all other modules use RPM & n
In Linux, almost all software is installed, uninstalled, and managed through RPM. RPM is called the Redhat Package Manager. it is proposed by Redhat to manage software packages in Linux. in addition to several core modules, almost all other modules are installed through RPM. RPM has five operation modes: installation, uninstallation, upgrade, query, and verification.
RPM installation
Command:
File name of the rpm-I package to be installed
Example:
Rpm-I example. rpm install the example. rpm Package:
Rpm-iv example. rpm install the example. rpm Package and display the file information that is being installed during the installation process;
Run rpm-ivh example. rpm to install the example. rpm package, and display the information about the files being installed and the installation progress;
RPM query operation
Command:
Rpm-q...
Additional query command:
A. query all installed packages.
The following two additional commands are used to query the information of the installation package:
I. The information of the installation package is displayed;
L displays the directories to which all files in the installation package are installed;
S displays the status of all files in the installation version and the directories to which the files are installed;
The following two additional commands are used to specify whether the installation package or the installed file needs to be queried;
P queries information about the installation package;
F query information about a file that has been installed;
Example:
Rpm-qa | grep tomcat4 check whether tomcat4 is installed;
Run rpm-qip example. rpm to view the information of the example. rpm installation package;
Run rpm-qif/bin/df to view the information of the installation package where the/bin/df file is located;
Run rpm-qlf/bin/df to check which Directory the files in the installation package where the/bin/df file is located are installed;
RPM uninstall operation
Command:
Installation package to be uninstalled by rpm-e
Before uninstalling, you usually need to use rpm-q... Command to find the name of the installation package to be uninstalled.
Example:
Rpm-e tomcat4 uninstall the tomcat4 software package
RPM upgrade operation
Command:
Rpm-U package to be upgraded
Example:
Rpm-Uvh example. rpm upgrade example. rpm Package
RPM verification operation
Command:
Rpm-V package to be verified
Example:
Rpm-Vf/etc/tomcat4/tomcat4.conf
The output information is similar to the following:
S.5 .... T c/etc/tomcat4/tomcat4.conf
Here, "S" indicates that the file size has been modified, and "T" indicates that the file date has been modified. for more verification information, see "rpm help file man rpm ".
Additional RPM commands
-Force operations (such as force installation and deletion );
-Requires: displays the dependency of the package;
-Nodeps ignores dependencies and continues operations;