Installation and uninstallation of RPM software packages under Linux
Under the Linux operating system, almost all of the software is installed, uninstalled and managed through RPM. RPM is all called the Redhat Package Manager, and is a software proposed by Redhat Corporation to manage packages under Linux. Linux installation, in addition to a few core modules, almost all the remaining modules are installed through the RPM. RPM has five modes of operation: Install, uninstall, upgrade, query and verify.
RPM Installation operation
Command:
Rpm-i The package file name that needs to be installed
Examples are as follows:
Rpm-i example.rpm installation example.rpm package;
Rpm-iv example.rpm installs the example.rpm package and displays the file information that is being installed during the installation process;
RPM-IVH example.rpm installs the example.rpm package and displays the file information and installation progress during the installation process;
RPM Query operation
Command:
Rpm-q ...
Additional query commands:
A query all installed packages The following two additional commands are used to query the installation package information;
I display the information of the installation package;
L Display the directories in which all files in the installation package are installed;
s displays the status of all files in the installation version and which directories are installed; The following two additional commands are used to specify whether the installation package or the installed file needs to be queried;
P The information of the installation package is queried;
f The query is a file information that has been installed;
Examples are as follows:
Rpm-qa | grep tomcat4 to see if TOMCAT4 is installed;
RPM-QIP example.rpm View the information of the example.rpm installation package;
RPM-QIF/BIN/DF View information about the installation package where the/bin/df file is located;
RPM-QLF/BIN/DF to see which directory each file in the installation package of the/BIN/DF file is installed in;
RPM Unload operation
Command:
RPM-E installation packages that need to be uninstalled
Before uninstalling, it is usually necessary to use the rpm-q ... command to isolate the name of the installation package that needs to be uninstalled.
Examples are as follows:
RPM-E TOMCAT4 Uninstall TOMCAT4 Package
RPM Upgrade operation
Command:
Rpm-u packages that need to be upgraded
Examples are as follows:
RPM-UVH example.rpm Upgrade EXAMPLE.RPM Package
RPM Verification Action
Command:
RPM-V packages that need to be validated
Examples are as follows:
Rpm-vf/etc/tomcat4/tomcat4.conf
The output information is similar to the following:
S.5 .... T c/etc/tomcat4/tomcat4.conf
Where S means that the file size has been modified and T indicates that the file date has been modified. For more information, please refer to the RPM Help file: Man rpm
Other additional commands for RPM
--force mandatory operation such as forced installation and removal;
--requires shows the dependency of the package;
--nodeps ignore dependencies and continue operation;
"Editor's recommendation"
- Linux under Production installation RPM package
- In-depth explanation RPM package installation/upgrade/query/Uninstall
- Explains Linux operating system rpm five basic operations
Installation and uninstallation of RPM software packages under Linux