When you upgrade the RPM package, do not use
UVHThe I recommend using
FVH
The former will be loaded without the installation of the package, the latter will only update the installed packageSummary: not installed plus lowercase p, installed do not need to add P queryQRPM {-q|--query} [select-options] [query-options]rpm's query function is extremely powerful, is one of the most important functions; For a few common examples, more specific, please refer to #man rpm1, Queries on installed software in the system; 1) query system installed software; syntax: RPM-Q software Name Example: [[email protected] ~]#
rpm-q php <===
rpm-qa |grep phpPhp-5.3.3-26.el6.x86_64[[email protected] ~]#
rpm-q ga
Package GA isn't installed-q is--query, Chinese means "ask", this command indicates whether the system installed Gaim, if the installation will have information output, if not installed, will output Gaim not installed information;
to view all installed packages in the system, add the-a parameter3) query where the installed packages are installed;
Syntax: RPM-QL software name or rpm RPMQUERY-QL software name
Example:
[Email protected] ~]#
rpm-ql php <==>
RPMQUERY-QL Lynx
/etc/httpd/conf.d/php.conf
/usr/lib64/httpd/modules/libphp5.so
/var/lib/php/session
/var/www/icons/php.gif
4) query information for an installed package
Syntax format:
Rpm-qi software name
Example:
[Email protected] rpms]#
Rpm-qi PHP[[email protected] ~]# Rpmquery-qi PHP
name:php Relocations: (not relocatable)
version:5.3.3 Vendor:centos
Release:26.el6 Build Date:fri 03:07:55 AM PST
Install date:wed Jan 01:41:10 AM PST Build Host:c6b9.bsys.dev.centos.org
Group:development/languages Source rpm:php-5.3.3-26.el6.src.rpm
size:3700269 license:php
SIGNATURE:RSA/SHA1, Sun 11:33:09 AM PST, Key ID 0946fca2c105b9de
Packager:centos Buildsystem url:http://www.php.net/
summary:php scripting language for creating dynamic Web sites
Description:
PHP is an html-embedded scripting language. PHP attempts to make it
Easy for developers to write dynamically generated webpages. PHP Also
Offers built-in database integration for several commercial and
Non-commercial database management systems, so writing a
database-enabled webpage with PHP are fairly simple. The most common
Use of PHP coding are probably as a replacement for CGI scripts.5) View the configuration files for the installed software;
Syntax format: RPM-QC software name
Example:
[[email protected] rpms]# RPM-QC Lynx 6) View a document where the software has been installed:
Syntax format: RPM-QD software name
Example:
[Email protected] rpms]# RPM-QD Lynx7) Check the packages and files on which the software is installed;
Syntax format:
RPM-QR software name
Example:[[email protected] ~]# RPMQUERY-QR PHP
Config (php) = 5.3.3-26.el6
httpd
HTTPD-MMN = 20051115
Libbz2.so.1 () (64bit)
Libc.so.6 () (64bit)
Libc.so.6 (glibc_2.11) (64bit) ....... ....................... ========================================== ==============2, for non-installed packages, view: The premise is that you have a. rpm file, that is, a view of the existing software file.rpm, etc. 1) to view the use of a software package, version and other information;
Grammar:
rpm-qPI file.rpm
Example:
[[email protected] rpms]# RPM-QPI lynx-2.8.5-23.i386.rpm 2) View the files contained in a package;
Grammar:
rpm-qPL file.rpm
Example:
[[email protected] rpms]# RPM-QPL lynx-2.8.5-23.i386.rpm 3) View the location of the package's documentation;
Grammar:
rpm-qPd file.rpm
Example:
[Email protected] rpms]# RPM-QPD lynx-2.8.5-23.i386.rpm4) View dependencies for a package
Syntax:
RPM-QPR file.rpm
Example:
[Email protected] archives]# RPM-QPR yumex_0.42-3.0.fc4_noarch.rpm
/bin/bash
/usr/bin/python
Config (yumex) = 0.42-3.0.fc4
Pygtk2
Pygtk2-libglade 5) View the configuration file for a package;
Grammar:
rpm-qPc file.rpm
Example:
[Email protected] rpms]# RPM-QPC lynx-2.8.5-23.i386.rpm
The query function of RPM package management