How to install software under Centos--rpm introduction

Source: Internet
Author: User

The software installation of CentOS can be broadly divided into two types:

RPM file installation, using RPM directives similar to [Ubuntu]deb file installation, using DPKG instructions

Yum installation similar to [Ubuntu]apt-get installation

Introduction to RPM Installation commands:

  (a) Query the system has installed software information

  For a RPM package, there are "-" and "." Consists of the following parts: * Package Name * Version Information * Release version number * Run platform when Noarch appears, represents software can be platform compatible

1) Check the software that is already installed in the system

Rpm-qa

2) query which package a file is already installed in;

RPM-QF filename

3) query where the installed packages are installed;

RPM-QL Software Name

4) query information for an installed package

Rpm-qi Software Name

5) Check the configuration file of the installed software;

Rpm-qc

6) View a document where the software has been installed:

Rpm-qd

7) Check the packages and files on which the software is installed;

Rpm-qr

(ii) installation, upgrading, deletion of software packages, etc.

1) Install or upgrade a RPM package

rpm-ivh rpm file "Install"

RPM-UVH rpm File "Update"

2) Delete a RPM package

RPM-E (regardless of dependencies, force the removal of the software, add--nodeps after the command)

  

(iii) for non-installed package information query

1) To view the use of a software package, version and other information;

Rpm-qpi

2) View the files contained in a package;

Rpm-qpl

3) View the location of the package's documentation;

Rpm-qpd

4) View the configuration file of a package;

Rpm-qpc

5) View dependencies for a package

Rpm-qpr

(iv) Signature Import

   RPM--import Signature file rpm--import Rpm-gpg-key

Introduction to RPM Package management:

RPM is an abbreviation for Red Hat Package Manager and is intended to be managed by Red Hat packages, as the name implies in the package management that Red Hat has contributed, and in mainstream releases such as Fedora, Redhat, Mandriva, SuSE, Yellowdog, etc. , as well as the two-time distributions that have been developed on the basis of these editions; What is included in the RPM package? It contains an executable binary, which is similar to an. exe file in a Windows package, and the RPM package also includes the files needed to run the program, which is similar to the Windows package, which runs the Windows program. In addition to the. exe file, there are other files, a RPM package of applications, and sometimes in addition to their own additional files to ensure that other specific version of the file, which is the package dependencies; dependencies are not specific to Linux, The same is true for Windows operating systems, and Linux and Windows are similar in principle.

Not all packages can be installed with the RPM command, and the file ends with the. rpm suffix.

Initialize the RPM database;

The RPM command is used to query whether an RPM package is installed and is done through the RPM database, so we often use the following two commands to initialize the RPM database;

RPM--INITDB

RPM--REBUILDDB

Note: This will take a long time; These two parameters are extremely useful, sometimes the RPM system is out of the question, can not be installed and query, mostly there is a problem;

If there is a dependency, please resolve the dependency, in fact, the package Manager can be a good solution to the dependency, see the previous Package Manager introduction, if you can not find dependencies in the package manager of the package, it can only compile the package he depends on to resolve the dependency, or force installation;

Grammatical structure: RPM-IVH file.rpm--nodeps--force

The--replacepkgs parameter is installed with the software installed again, sometimes not much necessary, test the installation parameters--test, used to check dependencies; not a real installation;

Downgrade to old version by new version, add--oldpackage parameter;

RPM-UVH--oldpackage gaim-1.3.0-1.fc4.i386.rpm

Specify the installation directory for the package: to add-relocate parameters;

RPM-IVH--relocate/=/opt/gaim gaim-1.3.0-1.fc4.i386.rpm

  How do the programs we install in the specified directory call? General execution procedures, are placed in the installation directory of the bin or sbin directory; see the following example; If there is an error output, do the corresponding link, with ln-s;

How to install software under Centos--rpm introduction

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.