LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 11-07-2009, 12:20 AM   #1
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Rep: Reputation: 30
Inquiry:How to add a command to my Linux server?


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
 
Old 11-07-2009, 01:11 AM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
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
 
Old 11-07-2009, 03:26 AM   #3
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
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
 
Old 11-07-2009, 06:08 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
 
Old 11-07-2009, 11:23 PM   #5
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
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
 
Old 11-08-2009, 05:37 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
.....
 
Old 11-08-2009, 06:18 AM   #7
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
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
 
Old 11-08-2009, 07:55 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
http://rpm.pbone.net/
Search > "Advanced Search" → Redhat 7.x , keyword = lshw

Some links ( e.g. ftp.icm.edu.pl ) still works, but slow.
 
Old 11-08-2009, 08:02 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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
 
Old 11-09-2009, 02:19 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@ 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 05:49 AM.
 
Old 11-09-2009, 06:19 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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.
 
Old 11-10-2009, 12:47 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 11

Point taken ... I agree ..
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration