FreeBSD - Tutorials, Security
Home   Archives   Sitemap   About   Contact

How to check if an rpm package is installed on a Red Hat Linux server

Home NEW! Unix Forum News 100 Tips and Tricks Website Development Server Operating Systems Databases
 Ivorde.ROarrow Server Operating Systems arrowAdministration GuidesarrowHow to check if an rpm package is installed on a Red Hat Linux server 

Article Sections

    Hello, Guest !
User name:
Password:
 
Google

 SSD VPS Hosting - Vpsie.com
 Mo.nitor.me
 Ivorde forum
 FreeBSD Tutorials
 Linux LVM Commands
 Free Shell Accounts
 FreeBSD Project
 FreeBSD Handbook
 Advanced Bash-Scripting Guide
 The OpenBSD Project
 Distrowatch
 FreeBSD Handbook


Apache Webserver Home Page

Blog, intrebari si raspunsuri despre Leasing

Posted on: 22 Jan 2008
Author: mandrei
Section: Server Operating Systems | Administration Guides
Views: 6163
Comments: 1 (Add)

How to check if an rpm package is installed on a Red Hat Linux server
rpm check, check if package is installed, red hat linux

 



Maintaining a server up-to-date requires regular rpm checks.

Each time Red Hat releases a newer version of, for example, samba rpm (and requisites) with fixes for known vulnerabilities one needs to check if your server already has that rpm installed and which version, to compare it with the new released one (in the case when you have under administration more servers).

How to check if an rpm package is installed on a Red Hat Linux server

$ rpm -qa | grep samba
samba-common-3.0.9-1.3E.14.1
samba-3.0.9-1.3E.14.1
samba-client-3.0.9-1.3E.14.1

Taking a look at man rpm we'll se that -q  queries and -a queries all packages:

$ man rpm
SYNOPSIS
   QUERYING AND VERIFYING PACKAGES:
       rpm {-q|--query} [select-options] [query-options]

       rpm {-V|--verify} [select-options] [verify-options]

       rpm --import PUBKEY ...

       rpm {-K|--checksig} [--nosignature] [--nodigest]
           PACKAGE_FILE ...
..............................................................
   select-options
        [PACKAGE_NAME] [-a,--all] [-f,--file FILE]
        [-g,--group GROUP] {-p,--package PACKAGE_FILE]
        [--fileid MD5] [--hdrid SHA1] [--pkgid MD5] [--tid TID]
        [--querybynumber HDRNUM] [--triggeredby PACKAGE_NAME]
        [--whatprovides CAPABILITY] [--whatrequires CAPABILITY]
   query-options
        [--changelog] [-c,--configfiles] [-d,--docfiles] [--dump]
        [--filesbypkg] [-i,--info] [--last] [-l,--list]
        [--obsoletes] [--provides] [--qf,--queryformat QUERYFMT]
        [-R,--requires] [--scripts] [-s,--state]
        [--triggers,--triggerscripts]

The result of the commands shows us that samba rpm and requisites are installed on our server.

You can replace samba with the rpm package you need and play a little with grep and regular expressions to limit the results of the command depending on the desired rpm name.

Bookmarks: Echo "How to check if an rpm package is installed on a Red Hat Linux server" around:
del.icio.usdiggFurlYahooMyWebGoogleBookmarksFaceBookTechnocratti
-------------------advertising-----------------

Other articles in Server Operating Systems / Administration Guides
» FreeBSD force port installation/upgrade even though portaudit reports vulnerability for it
» How to check for vulnerabilities installed ports on FreeBSD box
» FreeBSD: How to enable vulnerability check while installing a port?
» How to install lighttpd on FreeBSD
» Unix/Linux/BSD - Show / View sendmail version and upgrade sendmail




Contact webmaster regarding this article
Register or Login to post your article
Hello, Guest ! You can Login or Register to www.ivorde.ro!

 Post comment:

Name:
Title:
Comment:
Please type the word you see in the image (anti-spam verification). Refresh the page if you don't understand the word.
Verification code
Allowed HTML Tags for comments:<p><strong><em><u><h1><h2><h3><h4><h5><h6><img><li>
<ol><ul><span><div><br><ins><del>

1 comment(s) to How to check if an rpm package is installed on a Red Hat Linux server:

1. Re: How to check if an rpm package is installed on a Red Hat Linux server
Mr by Ashu at April 07th, 2011 - 07:17
Thanks it helped answer some basic queries..

   Latest topics on the forum:
 
   Most viewed articles:
ProFTPd + MySQL - 530 Login incorrect - 9324 views
Qmail relay to smarthost: How to route all mail to a smarthost - 9309 views
How to copy a mysql database using mysqldump - 8690 views
FreeBSD: Add/remove an additional IP alias - 8622 views
How to remove first/last character from a string using SED - 8386 views

   Latest 10 articles:
Qmail relay to smarthost: How to route all mail to a smarthost - 03 Feb 2009
EXIM 4 relay to smarthost: How to route all mail except local domain - 03 Feb 2009
Windows XP: print LISTEN ports and network connections using netstat - 30 Jan 2009
How to cut out first last n characters from each file name, from a filelist - 04 Nov 2008
Mozilla Firefox3 is now released - 18 Jun 2008
How to switch lower case to upper case and upper case to lower case in a string - 17 Jun 2008
How to rename files/directories to uppercase/lowercase character names - 17 Jun 2008
How to convert lower case to upper case letters in a shell script/command - 17 Jun 2008
Unix,Linux,FreeBSD - How to rename a list of files, replacing spaces inside their names - 12 Jun 2008
How to change a user's password in AIX with the output from ECHO command - 21 May 2008


Archives
» 2007  |  June  |  October  |  November  |  December
» 2008  |  January  |  February  |  March  |  April  |  May  |  June  |  November
» 2009  |  January  |  February



Home | Archives | Sitemap | About | Contact

Designed and developed by Andrei Manescu. Optimized for Mozilla Firefox.  
Copyright 2007 Andrei Manescu
All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by those who posted them.
Valid W3 Document Valid XHTML 1.0 Transitional Valid CSS! The FreeBSD Project Viewable With Any Browser