Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2nd July 2005, 10:32 AM
pratchaya Offline
Registered User
 
Join Date: Jun 2005
Posts: 51
Why can't i use command " service " and " chkconfig" on RHEL4 ES ? sir

Why can't i use command " service " and " chkconfig" on RHEL4 ES ? sir

Caz.
When i run SecureCRT through Openssh

[root@mammos html]# service
bash: service: command not found
[root@mammos html]# service httpd start
bash: service: command not found

[root@mammos html]# chkconfig httpd on
bash: chkconfig: command not found

But When i run on the console Redhat Server
it can run

I don't understand ? sir
Anyone can explain me sir. ?




What should i do next ? if i want to run these command through openssh ( secureCRT ) sir
Help me sir.

Last edited by pratchaya; 2nd July 2005 at 11:27 AM.
Reply With Quote
  #2  
Old 2nd July 2005, 11:23 AM
rayyes Offline
Registered User
 
Join Date: Dec 2004
Location: Toronto, ON
Posts: 408
did you login like this?
$ su -
__________________
Peace - To the Middle East.
rayyes.com
Reply With Quote
  #3  
Old 2nd July 2005, 11:33 PM
pushback Offline
Registered User
 
Join Date: Jun 2005
Location: Bay Area, California
Posts: 167
Put /sbin in your PATH environment variable, like so:

PATH=/sbin:$PATH

then try it
Reply With Quote
  #4  
Old 2nd July 2005, 11:41 PM
pushback Offline
Registered User
 
Join Date: Jun 2005
Location: Bay Area, California
Posts: 167
Converting/Upgrading raw MySQL data

My old, dead, Redhat 7.3 box has a lot of data in the database that I would like to run on FC4 (MySQL 4.1.11). Does anyone know of any conversion utilities that will convert this data to something 4.1.11 will work with?

Preferably I would be able to convert the data directly from the old MySQL tables. Any utilities that can do that would be nice. Alternatively, I suppose I can build a new 7.3 box and load the MySQL data onto it and convert it there--but that would be a real pain in the ... . (I can get to the files by mounting the device on my current system)

Anyway--any suggestions are appreciated.
Reply With Quote
  #5  
Old 3rd July 2005, 02:08 AM
gavinw6662 Offline
Registered User
 
Join Date: Feb 2005
Age: 35
Posts: 1,281
Quote:
Originally Posted by pushback
Put /sbin in your PATH environment variable, like so:

PATH=/sbin:$PATH

then try it

The above 2 are really god suggestions. If you become root by simply typing su, all that does is give you root permission, but it doesn't change you to root PATH's. If you become root with the 'su -' command then that changes you to the root PATH as well.

The obvious work around would be to 'su' without the root PATH, and then you have to make it /pathtocommand/service which would be /sbin/service httpd restart. That will work. If you are not sure where the command lies, you can do 'which command' and that will give you the full path.

hope that helps!!
Reply With Quote
  #6  
Old 3rd July 2005, 03:51 AM
pushback Offline
Registered User
 
Join Date: Jun 2005
Location: Bay Area, California
Posts: 167
[QUOTE=gavinw6662] If you are not sure where the command lies, you can do 'which command' and that will give you the full path. [QUOTE]

The 'which' command only looks down your exported current PATH in the order that the directories are listed in the PATH and responds with the first occurence. In his case, 'which' would give you nothing as the executables he is looking for are not in the PATH (or else they would have executed and he never would have posted his question).
Reply With Quote
  #7  
Old 3rd July 2005, 04:06 AM
w5set Offline
Registered User
 
Join Date: Feb 2005
Location: ark n saw out in the sticks
Posts: 2,316
he is ALREADY "root"--look at the prompt strings....
Reply With Quote
  #8  
Old 3rd July 2005, 02:34 PM
pparks1 Offline
Registered User
 
Join Date: Mar 2004
Location: Westland, Michigan
Age: 40
Posts: 2,317
w5set,

Yes, he is root. However, if he went to root with just (su) and not (su -), he won't get root's path which provide him the search path for finding those commands.
__________________
RHCE and MCSE systems administrator
Registered Linux User #375155 For More Info or to register yourself

My Linux box is:
Ubuntu 8.04, Antec Sonata II case with 450-watt PS, AMD 64 X2 4600+ (65 watt), 4GB DDR2 800 RAM, 18X Lite-On DVD burner, Asus M2NPV-VM, Nvidia GeForce 7600GT (256MB), 320GB Western Digital SATA 3.0Gbps, Logitech MX-310, Dell 18" ultrasharp LCD, Microsoft Natural Ergonomic Keyboard 4000 and 2.1 Boston Acoustics sound system..
Reply With Quote
  #9  
Old 3rd July 2005, 02:42 PM
tejas Offline
Registered User
 
Join Date: Feb 2005
Location: Bangalore
Age: 27
Posts: 1,574
I think the command gavinw6662 is thinking of is

whereis
__________________
I Was Counted! Registered Linux User #384707

BASH && Beer && Bass! Now THAT makes sense!!
Reply With Quote
  #10  
Old 6th July 2005, 04:41 PM
pratchaya Offline
Registered User
 
Join Date: Jun 2005
Posts: 51
Quote:
Originally Posted by pushback
Put /sbin in your PATH environment variable, like so:

PATH=/sbin:$PATH

then try it


How to + which file that i need to put it on ? sir

Help me sir.
Reply With Quote
  #11  
Old 6th July 2005, 05:05 PM
RahulSundaram Offline
Registered User
 
Join Date: May 2005
Posts: 3,748
Quote:
Originally Posted by pratchaya
How to + which file that i need to put it on ? sir

Help me sir.
There is no need to change the path manually, if you doing su to switch to root user, use "su -" instead. That automatically changes the path

Rahul
Red Hat Inc
Reply With Quote
Reply

Tags
chkconfig, command, rhel4, service, sir

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
terminal command problem "chkconfig: command not found" Omni-Tom Using Fedora 5 20th June 2013 03:32 PM
Swapping "Command" and "Control" Keys on MacBook? SendDerek Mac Chat 3 22nd June 2009 12:29 AM
"ls" and "cd" treat ".." differently inside symlinked directories bnorman Using Fedora 0 19th June 2008 04:49 PM
Metacity and "Xlib: extension "SHAPE" missing on display ":0.0". debu_sagii Using Fedora 0 29th August 2007 05:53 PM
Error:visibility arg must be one of "default", "hidden", "protected" or "internal" wangfeng Using Fedora 0 23rd May 2005 04:59 AM


Current GMT-time: 07:03 (Friday, 31-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Bandar Labuan Photos - Ad Dujayl - Hyesan-si Travel Photos on Instagram