Install and uninstall software packages in Centos

Source: Internet
Author: User
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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.