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 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-iexample.rpm installation example. rpm package:

The rpm-ivexample.rpm installs the example. rpm package and displays the file information that is being installed during installation;

The rpm-ivhexample.rpm installs the example. rpm package and displays information about the files being installed and the installation progress during installation;

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 | greptomcat4 check whether Tomcat 4 is installed;

Rpm-qipexample.rpm to view information about 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-etomcat4 uninstall tomcat4 Software Package

RPM upgrade operation

Command:

Rpm-U package to be upgraded

Example:

Rpm-Uvhexample.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 .... Tc/etc/tomcat4/tomcat4.conf

Here, "S" indicates that the file size has been modified, and "T" indicates that the file date has been modified. The file space is limited. For more verification information, see the rpm Help File manrpm.

Additional RPM commands

-Force operations (such as force installation and deletion );

-Requires: displays the dependency of the package;

-Nodeps ignores dependencies and continues operations;

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.