LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-09-2013, 02:01 AM   #1
xombboxer
Member
 
Registered: Apr 2011
Posts: 56

Rep: Reputation: 0
script to check all the libs/rps installed


We have build machines with RHEL and all of them should have extra libs installed on it. When a new machine is added, I need to check whether all the required libs installed or not. For this I need to write a script. Can anyone suggest me the best way.

I thought of writing a rpm package with all there libs as dependency. I think this needs lo of effort.

Post name edit : script to check all the libs/rpm installed

Last edited by xombboxer; 05-09-2013 at 02:02 AM.
 
Old 05-09-2013, 02:34 AM   #2
sysmicuser
Member
 
Registered: Mar 2010
Posts: 247

Rep: Reputation: 0
Question

@xombboxer

Do you have a list of rpm's/lib packages list from your current RHEL server?

I think it should not be that challenging, I am not guru but my line of thinking is produce a list on source server and then compare it with "target" server.

Say rpm packages.

Code:
rpm -qa|sort
Output produced by this one should be saved, perhaps if you want, you can lock it by chmod and then read then on target server and report anything which is missing?

Please let me know if you want code for redirection and reading.

Thank you.
 
Old 05-09-2013, 03:13 AM   #3
xombboxer
Member
 
Registered: Apr 2011
Posts: 56

Original Poster
Rep: Reputation: 0
Yes,I have the list of libs

@sysmicuser, Idea is good but it will list all the RPMs, the list will be big. I don't want the default RPMs. I have some 20 libs those needs to be installed in addition to the default ones and I need to deal with 20 libs. I am thinking reading all the 20 libs from a text file and then check each one in a for loop
 
Old 05-09-2013, 04:13 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,543
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
No need to loop over it if you use 'rpm -qa' with your file and 'fgrep'.
 
Old 05-09-2013, 05:28 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,125

Rep: Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639
If you know when the extra packages were added, the --last option may help.
Will output a list with install date / time :

$ rpm -qa --last > last-packages.txt


-
 
Old 05-09-2013, 07:56 AM   #6
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,569
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by xombboxer View Post
I need to check whether all the required libs installed or not. For this I need to write a script. Can anyone suggest me the best way.
Learn Linux, 101: RPM and YUM package management
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash script to check ioCube and suphp is installed waha87 Programming 2 10-26-2011 12:27 AM
How to check weather rps is working or not..... dashang.trivedi Linux - Kernel 3 03-01-2011 09:56 AM
Libs being installed to /usr/local/lib? Archer36 Slackware 3 01-26-2006 12:52 AM
Shell Script to Check apache installed or not. apt Programming 7 12-07-2004 12:07 AM
RPM installer not recognizing installed libs? Jiawen Mandriva 5 09-29-2003 05:34 PM


All times are GMT -5. The time now is 12:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration