LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Inquiry:How to add a command to my Linux server? (https://www.linuxquestions.org/questions/linux-newbie-8/inquiry-how-to-add-a-command-to-my-linux-server-767466/)

hadimotamedi 11-07-2009 12:20 AM

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

jstephens84 11-07-2009 01:11 AM

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

hadimotamedi 11-07-2009 03:26 AM

Quote:

Originally Posted by jstephens84 (Post 3747903)
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

knudfl 11-07-2009 06:08 AM

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

hadimotamedi 11-07-2009 11:23 PM

Quote:

Originally Posted by knudfl (Post 3748083)
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

knudfl 11-08-2009 05:37 AM

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
.....

hadimotamedi 11-08-2009 06:18 AM

Quote:

Originally Posted by knudfl (Post 3748985)
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

knudfl 11-08-2009 07:55 AM

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

Some links ( e.g. ftp.icm.edu.pl ) still works, but slow.

chrism01 11-08-2009 08:02 PM

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

knudfl 11-09-2009 02:19 AM

@ 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 ...
.....

chrism01 11-09-2009 06:19 PM

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.

knudfl 11-10-2009 12:47 AM

# 11

Point taken ... I agree ..


All times are GMT -5. The time now is 07:02 AM.