Linux package installation and uninstallation tutorial

  

Under Linux operating system
, almost all software is installed, uninstalled and managed through RPM. The full name of RPM is Redhat Package Manager, which is a software proposed by Redhat to manage software packages under Linux. When installing Linux, except for several core modules, almost all of the modules are installed through RPM. RPM has five modes of operation: installation, uninstallation, upgrade, query and verification.

RPM Installation Operation

Command: rpm -i The name of the package file to be installed is as follows: rpm -i example.rpm Install the example.rpm package; rpm -iv example.rpm Install example. Rpm package and display the file information being installed during the installation process; rpm -ivh example.rpm Install the example.rpm package and display the file information and installation progress of the installation process during the installation process;

RPM query operation< Br>

Command: rpm -q … Additional query command: 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 all the packages in the installation package Which directories the files are installed to; s shows the status of all files in the installation and which directories are installed; the following two additional commands are used to specify whether the files need to be queried for the installation package or the installed files: p Query is Information about the installation package; f Query the information of a file that has been installed; for example: rpm -qa |  Grep tomcat4 Check tomcat4 is installed rpm -qip example.rpm View example.rpm installation package information rpm -qif /bin/df View the /bin/df file installation package information rpm -qlf /bin/df View /bin/Which directory is installed in the installation package where the df file is located?

RPM Uninstall Operation

Command: rpm -e The installation package that needs to be uninstalled usually needs to use rpm before uninstalling - The q … command finds the name of the installation package that needs to be uninstalled. For example: rpm -e tomcat4 Uninstall tomcat4 package

RPM upgrade operation

Command: rpm -U Examples of packages that need to be upgraded are as follows: rpm -Uvh example.rpm Upgrade example.rpm package

RPM Verification Operation

Command: rpm -V Examples of packages to be verified 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 indicates that the file size has been modified. T indicates that the file date has been modified. Due to space limitations, please refer to the rpm help file for more verification information: man rpm

Additional commands for RPM

–force Forces operations such as forcibly installing deletes, etc.; –requires shows the dependencies of the package; –nodeps ignores dependencies and continues to operate;

Copyright © Windows knowledge All Rights Reserved