Mylinux Note---10th day

Source: Internet
Author: User

One, RPM (RedHat Package Manager) is a Linux software installation and management program developed by RedHat Corporation.

RPM package files are in. rpm suffix, General format:

Package name-version number-fixed version. Hardware platform. rpm

How to use RPM commands

General Options

-H: Shows the progress of completion with "#"

--keep-temps: Keep Temporary files

--quiet: Give a message only if there is an error

--version: Show rpm version

Select options

-A: Querying all installed Packages

-F: Query which package the file was installed by

Query options

-I: Display package information

-L: Lists the files contained within the package

--provides: Shows the features provided by this package

-R: Querying other packages that the package depends on

-S: Lists the status of all files in the package

Validation options

--nodeps: Does not validate dependent packages

--nofiles: The properties of the package file are not validated

Installation options

--force: Mandatory installation, regardless of whether the package has been installed

--nodeps: If the installed package has a dependent package, ignore the dependent package, force the installation

--test: Analog Installation

Delete option

--allmatches: Remove all versions of the package with the specified name

--nodeps: Ignore dependent packages, Force delete

--test: Analog Delete



Instance

1. Installing the RPM Package

Command format

RPM-IVH Package file name

[Email protected] packages]# RPM-IVH tree-1.5.3-2.el6.i686.rpmpreparing ... ############################## ############# [100%] 1:tree ########################################### [100%]

2. View RPM Package

① to view package details

Command format

RPM-QI Package Name

[[email protected] packages]# rpm -qi treename         : tree                          Relocations:  (not relocatable) version     : 1.5.3                               Vendor: CentOSRelease     : 2.el6                           build date: 2010 August 23   Monday  07 00 minutes 37 seconds install date: 2015 March 29   Sunday  06 59 minutes, 09 seconds       Build Host: c6b6.bsys.dev.centos.orgGroup        : Applications/File              source rpm: tree-1.5.3-2.el6.src.rpmsize        : 64903                              license: gplv2+signature   :  rsa/8, 2011 July 03   Sunday  12 51 minutes, 30 seconds, key id 0946fca2c105b9depackager     : CentOS BuildSystem 

② viewing the file list for a package

Command format

RPM-QL Package Name

[Email protected] packages]# RPM-QL tree/usr/bin/tree/usr/share/doc/tree-1.5.3/usr/share/doc/tree-1.5.3/license/ Usr/share/doc/tree-1.5.3/readme/usr/share/man/man1/tree.1.gz

③ View all other packages that the package depends on

Command format

RPM-QR Package Name

[Email protected] packages]# RPM-QR treelibc.so.6libc.so.6 (glibc_2.0) libc.so.6 (glibc_2.1) libc.so.6 (glibc_2.2) Libc.so.6 (glibc_2.3) libc.so.6 (glibc_2.3.4) libc.so.6 (glibc_2.4) rpmlib (compressedfilenames) <= 3.0.4-1rpmlib ( filedigests) <= 4.6.0-1rpmlib (payloadfileshaveprefix) <= 4.0-1rtld (Gnu_hash) rpmlib (PayloadIsXz) <= 5.2-1

④ to view a list of all packages installed in the system

Command format

Rpm-qa

[Email protected] packages]# Rpm-qa |head- 5libglade2-2.6.4-3.1.el6.i686filesystem-2.4.30-3.el6.i686libgxim-0.3.3-3.1.el6.i686cjkuni-fonts-common-0.2.20080216.1-36 . el6.noarchgnome-keyring-2.28.2-8.el6_3.i686

⑤ to see which package is installed by a program in a file

Command format

RPM-Q Program Name

[Email protected] packages]# rpm-q/usr/bin/xzxz-4.999.9-0.5.beta.20091007git.el6.i686

3. Upgrade Package

Command format

RPM-UVH Package file name

4. Delete Package

Command format

RPM-E Package file name

[Email protected] packages]# rpm-e xz-4.999.9-0.5.beta.20091007git.el6.i686



Ii. use of the Yum tool

Common options



Third, source code installation

1. Unzip the source code installation package with the TAR command

2. Perform configure configuration compilation options

3. Execute the make command to compile the source code

4. Execute the Make install command to install the compiled program







This content by Mentor: Amin provides technical support: with Amin learn Linux dot here



This article is from the "Mylinux" blog, make sure to keep this source http://mylinuxlife.blog.51cto.com/4706737/1626775

Mylinux Note---10th day

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.