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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-07-2009, 12:20 AM
|
#1
|
Member
Registered: Aug 2009
Posts: 228
Rep:
|
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
|
|
|
11-07-2009, 01:11 AM
|
#2
|
Senior Member
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098
Rep:
|
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
|
|
|
11-07-2009, 03:26 AM
|
#3
|
Member
Registered: Aug 2009
Posts: 228
Original Poster
Rep:
|
Quote:
Originally Posted by jstephens84
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
|
|
|
11-07-2009, 06:08 AM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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
|
|
|
11-07-2009, 11:23 PM
|
#5
|
Member
Registered: Aug 2009
Posts: 228
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
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
|
|
|
11-08-2009, 05:37 AM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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
.....
|
|
|
11-08-2009, 06:18 AM
|
#7
|
Member
Registered: Aug 2009
Posts: 228
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
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
|
|
|
11-08-2009, 07:55 AM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
http://rpm.pbone.net/
Search > "Advanced Search" → Redhat 7.x , keyword = lshw
Some links ( e.g. ftp.icm.edu.pl ) still works, but slow.
|
|
|
11-08-2009, 08:02 PM
|
#9
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,393
|
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
|
|
|
11-09-2009, 02:19 AM
|
#10
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
@ 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.
|
|
|
11-09-2009, 06:19 PM
|
#11
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,393
|
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.
|
|
|
11-10-2009, 12:47 AM
|
#12
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 11
Point taken ... I agree ..
|
|
|
All times are GMT -5. The time now is 09:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|