LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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
 
Thread Tools
Old 11-07-2009, 01:20 AM   #1
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 87
Thanked: 0
Inquiry:How to add a command to my Linux server?


[Log in to get rid of this advertisement]
Dear All
Can you please do me favor and let me know how can I add a command to my Red Hat 7.2 server ? Please be informed that I found that the Linux "dmidecode" command can be used to check for my Linux server mainboard type but unfortunately my server doesn't have this command as installed . Can you please let me know how can I add this "dmidecode" command to my Linux server ?
Let me thank you in advance
windows_xp_2003 hadimotamedi is offline     Reply With Quote
Old 11-07-2009, 02:11 AM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: Lab Server - FreeBSD 7.2 Laptop - Linux Mint
Posts: 1,861
Thanked: 35
ftp://ftp.pbone.net/mirror/ftp.redha....2.el5.src.rpm that will get you the source rpm. then you just need to open up a terminal and type in
Code:
rpm -i ./dmidecode-2.7-1.28.2.el5.src.rpm
and that should install the package for you. This package should setup the command and place it in the correct /bin or /sbin/ folder. you might also want to check /usr/src/redhat/SPECS. If you see a file or files in there then you will need to run

Code:
rpmbuild -bb dmidecode.spec
this will build the rpm file that you can install. then type in
Code:
rpm -i dmidecode-2.7-1.28.2.i386.rpm
linuxmint jstephens84 is offline     Reply With Quote


Old 11-07-2009, 04:26 AM   #3
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 87
Thanked: 0

Original Poster
Quote:
Originally Posted by jstephens84 View Post
ftp://ftp.pbone.net/mirror/ftp.redha....2.el5.src.rpm that will get you the source rpm. then you just need to open up a terminal and type in
Code:
rpm -i ./dmidecode-2.7-1.28.2.el5.src.rpm
and that should install the package for you. This package should setup the command and place it in the correct /bin or /sbin/ folder. you might also want to check /usr/src/redhat/SPECS. If you see a file or files in there then you will need to run

Code:
rpmbuild -bb dmidecode.spec
this will build the rpm file that you can install. then type in
Code:
rpm -i dmidecode-2.7-1.28.2.i386.rpm
Thank you very much for your reply . Please be informed that I tried for your proposed procedure but it was unsuccessful in my case here . I first tried to download the "dmidecode-2.7-1.28.2.el5.src.rpm" from the ftp site and I copied it into /tmp folder . Then I issued the following command :
#rpm -i ./dmidecode-2.7-1.28.2.el5.src.rpm
It returned no error message . Then I checked under the /usr/src/redhat/SPECS folder and tried as the followings :
#rpmbuild -bb dmidecode.spec
The last step will be to issue the followings :
#rpm -i dmidecode-2.7-1.28.2.i386.rpm
But I cannot find that *.i386.rpm package . I checked and I didn't see the dmidecode to be added to my Linux server commands set. Can you please do me favor and let me know what is wrong my case here ?
Thank you in advance
windows_xp_2003 hadimotamedi is offline     Reply With Quote


Old 11-07-2009, 07:08 AM   #4
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,935
Thanked: 277
Location of i386 packages created with 'rpmbuild' :

/usr/src/redhat/RPMS/i386/
.. you can check it with the ' ls ' command :
ls /usr/src/redhat/RPMS/i386/

If the package is present, then please do :
# rpm -Uvh /usr/src/redhat/RPMS/i386/dmidecode-2.7-1.28.2.i386.rpm
linuxpclinuxos knudfl is offline     Reply With Quote


Old 11-08-2009, 12:23 AM   #5
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 87
Thanked: 0

Original Poster
Quote:
Originally Posted by knudfl View Post
Location of i386 packages created with 'rpmbuild' :

/usr/src/redhat/RPMS/i386/
.. you can check it with the ' ls ' command :
ls /usr/src/redhat/RPMS/i386/

If the package is present, then please do :
# rpm -Uvh /usr/src/redhat/RPMS/i386/dmidecode-2.7-1.28.2.i386.rpm
Thank you very much for your help . I tried for it and it got through . Can you please do me favor and let me know if the above procedure is general ? I mean if this procedure is the general procedure for adding various commands to my Red Hat 7.2 server ? If so , can you please give me the link to the general ftp site that can be used to add extra commands to Red Hat 7.2 server ?
Thank you in advance
windows_xp_2003 hadimotamedi is offline     Reply With Quote


Old 11-08-2009, 06:37 AM   #6
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,935
Thanked: 277
Quote:
Can you please do me favor and let me know
if the above procedure is general ?
Not really : if the rpm's were created to e.g
' /home/"name"/rpms/// ', as often recommended,
the command would be :
rpm -Uvh /home/'name'/rpms/RPMS/<arch>/<package>.rpm
http://www.linuxquestions.org/questi...6/highlight#10
.....
.....

Other commands : difficult to know, there are 2,000 up
common commands + their options. And I don't use a server.
It all depends, what you use, or want to use.

May be have a look in the good old "Rute User's Tutorial"
http://linux.2038bug.com/rute-home.html
.....
linuxpclinuxos knudfl is offline     Reply With Quote


Old 11-08-2009, 07:18 AM   #7
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 87
Thanked: 0

Original Poster
Quote:
Originally Posted by knudfl View Post
Not really : if the rpm's were created to e.g
' /home/"name"/rpms/// ', as often recommended,
the command would be :
rpm -Uvh /home/'name'/rpms/RPMS/<arch>/<package>.rpm
http://www.linuxquestions.org/questi...6/highlight#10
.....
.....

Other commands : difficult to know, there are 2,000 up
common commands + their options. And I don't use a server.
It all depends, what you use, or want to use.

May be have a look in the good old "Rute User's Tutorial"
http://linux.2038bug.com/rute-home.html
.....
Thank you for your reply . Can you please do me favor and let me have the link for installing the "lshw" command on my Red Hat 7.2 server ? Please let me have the link to ftp site to download the rpm package and try for the same procedure .
Thank you in advance
windows_xp_2003 hadimotamedi is offline     Reply With Quote


Old 11-08-2009, 08:55 AM   #8
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,935
Thanked: 277
http://rpm.pbone.net/
Search > "Advanced Search" → Redhat 7.x , keyword = lshw

Some links ( e.g. ftp.icm.edu.pl ) still works, but slow.
linuxpclinuxos knudfl is offline     Reply With Quote


Thanked by:
Old 11-08-2009, 09:02 PM   #9
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,439
Thanked: 326
RH 7.2 (codename Enigma) went out of service/no updates many yrs ago http://en.wikipedia.org/wiki/Red_Hat_Linux.
You are going to have major problems doing stuff with it eg it won't recognise current hw and those rpms above say ...el5... which means they are for the current RHEL (RedHat Enterprise Linux) v5.x Definitely not compatible.
Do yourself a favour and get a current distro eg RHEL 5.4 (paid subscription/updates/) or Centos 5.4; a free version of RHEL5.4
windows_xp_2003 chrism01 is offline     Reply With Quote


Old 11-09-2009, 03:19 AM   #10
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,935
Thanked: 277
@ chrism01 , post # 9

May be the OP isn't allowed to change the server OS ?

And I think it is quite clear, that the rh7.x packages are available , e.g.
ftp://ftp.icm.edu.pl/vol/rzm1/linux-...h7.rf.i386.rpm

.. This link is fast today ...

.. then it is up to the OP to test, if the package works ...
.....

Last edited by knudfl; 11-10-2009 at 06:49 AM..
linuxpclinuxos knudfl is offline     Reply With Quote


Old 11-09-2009, 07:19 PM   #11
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,439
Thanked: 326
Actually, I should have said '... if possible'. Note that although pkgs are avail for 7.2, it hasn't been updated in yrs .. For security reasons, this is bad for us as well as the user.
windows_xp_2003 chrism01 is offline     Reply With Quote


Thanked by:
Old 11-10-2009, 01:47 AM   #12
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,935
Thanked: 277
# 11

Point taken ... I agree ..
linuxpclinuxos knudfl is offline     Reply With Quote



Reply

Bookmarks


Thread Tools

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
Inquiry:How to convert *.wav files on the Linux server? hadimotamedi Linux - Newbie 3 09-26-2009 08:58 AM
Inquiry:How to install Windows XP on an Linux server hadimotamedi Linux - Newbie 23 09-06-2009 06:12 AM
Inquiry:How to check for the Linux server hardware healthy functionality hadimotamedi Linux - Newbie 1 09-04-2009 12:40 AM
Inquiry: How to add the "netconf" utility to my Linux server hadimotamedi Linux - Software 4 08-18-2009 03:37 AM
dpkg command line inquiry AndeAnderson Linux - Newbie 1 10-25-2005 06:11 AM


All times are GMT -5. The time now is 03:02 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration