1825931 Members
2836 Online
109689 Solutions
New Discussion

Re: can't run service

 
juno2
Super Advisor

can't run service

I have newly install a RH 8 , i want to start the nfs service with the command " # service nfs restart " , but it pop up "-bash: service: command not found" , how can i fix the problem ? thx
7 REPLIES 7
Tom Ward_1
Honored Contributor

Re: can't run service

Please make sure you have nfs-utils installed.
You can use "rpm -q nfs-utils" to verify that it's installed. If not, you'll need to install it to get nfs. Good luck,
Tom
Stuart Browne
Honored Contributor

Re: can't run service

The other thing you might want to look at is how you got root access. If you didn't "/bin/su -", you won't have "/sbin" in your path, thus 'service' won't be runable like that.
One long-haired git at your service...
Claudio Cilloni
Honored Contributor

Re: can't run service

this is really strange. Maybe /sbin isn't in your PATH variable. try using

# /sbin/service nfs start

if you get the same error then I think something went wrong during the installation. (installing RH 9 instead of RH 8 is always a good idea)

hth

Claudio
Jerome Henry
Honored Contributor

Re: can't run service

This seems to be paraphrasing, but follow in order :
Be sure to be root with full rights. If you connected as user, do a 'su -' to be root, not 'su'. Retry.
If it doesn't work, do a 'rpm -qa | grep nfs' to see what nfs stuff is installed. If nfs-utils are missing, install them from CD rom.

It MUST work !

:]]

J
You can lean only on what resists you...
Steven E. Protter
Exalted Contributor

Re: can't run service

after checking for the nfs utils

make sure you have a valid /etc/exports file

If you don't have one, create one.

ll /etc/init.d/nfs*

If you don't get any hits something has been deleted. Best to remove and reinstall nfs.

After all this.

service nfs start

Should return this output:

Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Balaji N
Honored Contributor

Re: can't run service

++++++++++++++++++++
[balaji@fire balaji]$ rpm -q --whatprovides '/sbin/service'
initscripts-6.40-1
[balaji@fire balaji]$ rpm -qi initscripts-6.40-1
Name : initscripts Relocations: (not relocateable)
Version : 6.40 Vendor: Red Hat, Inc.
Release : 1 Build Date: Sun 09 Sep 2001 12:40:42 PM IST
Install date: Sat 02 Mar 2002 05:05:03 PM IST Build Host: stripples.devel.redhat.com
Group : System Environment/Base Source RPM: initscripts-6.40-1.src.rpm
Size : 1732606 License: GPL
Packager : Red Hat, Inc. <>
Summary : The inittab file and the /etc/init.d scripts.
Description :
The initscripts package contains the basic system scripts used to boot
your Red Hat system, change runlevels, and shut the system down
cleanly. Initscripts also contains the scripts that activate and
deactivate most network interfaces.
[balaji@fire balaji]$
++++++++++++++++++++

i dont think nobody would have messed with this rpm.

so try running /sbin/service and see if this helps. then modify your path accordingly.


hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Caesar_3
Esteemed Contributor

Re: can't run service

Hello!

Check in /sbin if you have the service
if not then you need to install "initscripts"
package for you OS.

Caesar