What is RPM | Rpm Install Query Verify Erase Update -i -v -q -V -e

RPM is the Powerful package manager.
which is used for Install, Query, Verify, Update, Erase
software package.

Qurey related rpm package tool
-V refers to verify
[root@Jesus ~]# rpm -V http*
package http* is not installed

-q mean Query
[root@Jesus ~]# rpm -q http*
package http* is not installed

-q -l query list -ql
[root@Jesus ~]# rpm -ql http*
package http* is not installed
-i it will install that specified rpm package

1)[root@Jesus Server]# rpm -ivh lam-7.1.2-14.el5.i386.rpm
warning: lam-7.1.2-14.el5.i386.rpm:
Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...         ########################################### [100%]

 2)#rpm -ivh --force package_name.rpm package is already installed, if we want to install forcefully.

 3)#rpm -ivh --nodep package_name.rpm install rpm package without dependency.


4)Find out the which rpm package is root of this configuration file
#rpm -qf /etc/httpd/conf/httpd.conf
httpd-2.2.3-31.el5.centos
Get the Details Information About that Package.
Before Installing To check Option -p with .rpm(-p Package)
After Installation to check Option -f with Command or Configuration File (-f File)
BEFORE installation that package Get the Details about that package Information.
# rpm -qip /root/nagios-3.1.0-1.x86_64.rpm
warnine: /root/HCLHPCV2.5/Nagios/nagios-3.1.0-1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 91f97d2e
Name        : nagios                       Relocations: /usr /etc/init.d /etc/nagios /var/log/nagios /var/spool/nagios 
Version     : 3.1.0                             Vendor: (none)
Release     : 1                             Build Date: Tue 25 Aug 2009 07:00:29 PM IST
Install Date: (not installed)               Build Host: wn011.datagrid.cea.fr
Group       : Application/System            Source RPM: nagios-3.1.0-1.src.rpm
Size        : 857682                           License: GPL
Signature   : DSA/SHA1, Tue 25 Aug 2009 07:02:02 PM IST, Key ID 5e1ff8ed91f97d2e
Summary     : Host/service/network monitoring program
Description:
Nagios is a program that will monitor hosts and services on your
network. It has the ability to email or page you when a problem arises
and when a problem is resolved. Nagios is written in C and is
designed to run under Linux (and some other *NIX variants) as a
background process, intermittently runnine checks on various services
that you specify.

The actual service checks are performed by separate "plugin" programs
which return the status of the checks to Nagios. The plugins are
available at http://sourceforge.net/projects/nagiosplug
This package provide core programs for nagios. The web interface,

5)AFTER Installation Get the Details About that files.
# rpm -qif /etc/httpd/conf/httpd.conf
Name        : httpd                        Relocations: (not relocatable)
Version     : 2.0.52                            Vendor: Red Hat, Inc.
Release     : 9.ent                         Build Date: Tue 30 Nov 2004 09:56:02 PM IST
Install Date: Fri 05 Aug 2011 01:33:47 PM IST      Build Host: porky.build.redhat.com
Group       : System Environment/Daemons    Source RPM: httpd-2.0.52-9.ent.src.rpm
Size        : 2413217                          License: Apache Software License
Signature   : DSA/SHA1, Thu 06 Jan 2005 02:29:37 AM IST, Key ID 219180cddb42a60e
Packager    : Red Hat, Inc. 
URL         : http://httpd.apache.org/
Summary     : The httpd Web server
Description :
This package contains a powerful, full-featured, efficient, and
freely-available Web server based on work done by the Apache Software
Foundation. It is also the most popular Web server on the Internet.
 -i Install , -v Verbose , -f File ,-d Documentary Files , -q Query ,-l List the Package

6)List out the Corresponding Related RPM Files
# rpm -qlp /root/HCLHPCV2.5/Nagios/nagios-3.1.0-1.x86_64.rpm
warnine: /root/HCLHPCV2.5/Nagios/nagios-3.1.0-1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 91f97d2e
/etc/init.d/nagios
 /etc/nagios
7)How To Find Out the Log File For Specified Configuration File.
#rpm -qlf /etc/httpd/conf/httpd.conf | grep log
/etc/httpd/logs
………………….
/var/log/httpd
In this way we can find out the log file for specified configuration file.

Related post