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

 SATELLITE INTERNET
 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: 2213
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
» Using rsync with progress bar




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:
Linux: How to list IPv6 neighbors
VPSie - vpsie.com - New SSD VPS provider- 6 months free SSD VPS hosting
FreeBSD: How to list IPv6 neighbors
How to add (persistent) static ARP entries in Linux
How to change crontab editor in Debian Linux
Junos router advertisements - Unix IPv6 stateless autoconfiguration via SLAAC
Juniper SRX firewall debug: packet dropped: for self but not interested
IPv6 enablement for Ivorde.ro
How to force NTP in Debian/Ubuntu to synchronize to IPv4 servers, not IPv6 (default \w both proto)
BGP Blackhole (RTBH) with Juniper SRX firewall
 
   Most viewed articles:
qmail qmail-scanner/clamav qmail-inject: fatal: qq temporary problem / clamdscan: corrupt or unknown clamd scanner error or memory/resource/perms problem - exit status 512/2 - 21590 views
AIX 5.3 - How to check for failed login attempts - 11438 views
Reloading /etc/profile - how to reload Unix /etc/profile - 8928 views
How to cat a file removing commented lines in Unix/Linux - 6414 views
Set up HTTP PROXY via command line in Linux/FreeBSD - 6337 views

   Latest 10 articles:
FreeBSD - Collect installed hard disk drive information - 19 Mar 2009
Set up FTP PROXY via command line in Linux/FreeBSD - 19 Mar 2009
Set up HTTP PROXY via command line in Linux/FreeBSD - 19 Mar 2009
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
qmail qmail-scanner/clamav qmail-inject: fatal: qq temporary problem / clamdscan: corrupt or unknown clamd scanner error or memory/resource/perms problem - exit status 512/2 - 05 Dec 2008
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


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



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