LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-19-2005, 10:17 AM   #1
Aljaber
Member
 
Registered: Sep 2003
Location: Milky Way Galaxy
Distribution: Slackware , RedHat
Posts: 40

Rep: Reputation: 15
service does not start


hi guys

i have already performed full fc4 installation, but when i type

#service httpd start

it gives me
bash: service: command not found

so ! what is the problem?

thanks
 
Old 11-19-2005, 12:23 PM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Are you sure you're not just meant to type "httpd start"?
 
Old 11-19-2005, 04:24 PM   #3
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Aljaber: You need to execute the service command with root privileges.

su -
service httpd start
--OR--
/etc/init.d/httpd start
 
Old 11-21-2005, 07:25 AM   #4
Aljaber
Member
 
Registered: Sep 2003
Location: Milky Way Galaxy
Distribution: Slackware , RedHat
Posts: 40

Original Poster
Rep: Reputation: 15
thanks a lot guys for your care

but if you noticed, the problem is with command "service"

bash syas:

"service: command not found"

thanks in advanced
 
Old 11-21-2005, 07:35 AM   #5
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
If there is such a command, then you need to install whatever package it is part of. On my machine (running Slack 10.1), I can start apache with "httpd start" or "apachectl start" (both need root privileges).
 
Old 11-21-2005, 09:14 AM   #6
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Quote:
Originally posted by Aljaber
thanks a lot guys for your care

but if you noticed, the problem is with command "service"

bash syas:

"service: command not found"

thanks in advanced
Executing “service” in RHL/RHEL/Fedora requires root privileges.

Let’s try that one more time: Executing “service” in RHL/RHEL/Fedora requires root privileges.

You can try to execute it as a regular user until your keyboard breaks and it will never run. Try running the command:

su -

and then try running service...
 
Old 11-21-2005, 10:37 AM   #7
Aljaber
Member
 
Registered: Sep 2003
Location: Milky Way Galaxy
Distribution: Slackware , RedHat
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by WhatsHisName
Executing “service” in RHL/RHEL/Fedora requires root privileges.

Let’s try that one more time: Executing “service” in RHL/RHEL/Fedora requires root privileges.

You can try to execute it as a regular user until your keyboard breaks and it will never run. Try running the command:

su -

and then try running service...
veeeeeeeeeeeeeeeeeeeeeeeeeeery funny

if you notice, i wrote in my post

Quote:
# service httpd start
and in "Linux || Unix like systems" using the '#' means that i am a root


thanks for your helpful reply
 
Old 11-21-2005, 12:26 PM   #8
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Quote:
Originally posted by Aljaber
veeeeeeeeeeeeeeeeeeeeeeeeeeery funny

if you notice, i wrote in my post



and in "Linux || Unix like systems" using the '#' means that i am a root


thanks for your helpful reply
That only tells us that you are logged as the root user. It doesn’t tell us whether you have full privileges and you need full privileges to execute “service”.

Correction: You can run “/sbin/service httpd start” without full privileges.

Last edited by WhatsHisName; 11-21-2005 at 01:42 PM.
 
Old 11-21-2005, 01:29 PM   #9
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
/sbin/service httpd start
or su -
service httpd start

or

/etc/init.d/httpd start

or

/usr/sbin/apachectl start

Last edited by doublejoon; 11-21-2005 at 01:37 PM.
 
Old 11-21-2005, 01:42 PM   #10
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
doublejoon is correct and has been noted above. Need more coffee.
 
Old 12-01-2005, 11:53 AM   #11
wpg9210
Member
 
Registered: Apr 2004
Distribution: Fedora 4
Posts: 68

Rep: Reputation: 16
Couple things:
First, how do you know wether or not you have full root privelages? I do an SU, log in as root. It says root@localhost> so then I should have full privelages correct?

After which if i type service i get a command not found error? Whats the deal?
 
Old 12-01-2005, 07:07 PM   #12
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
well su assumes the user root.

su - (a dash!)

assumes roots environment (paths etc)

as shown above, by logging in as root with su, you have to execute the file with it's full path as it isn't included in the default path.

to view your path type:

Code:
echo $PATH
so try it with your normal user, logged in with su, and logged in with su - you will see the different directories in their paths.


On my FC4 system the command service is in /sbin:

Code:
slocate service
which is not included in my user or su paths, just the su-

Again as mentioned above if you simply login with su then /sbin/service httpd start is fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 01:59 PM
service could not start LinuxRam Linux - Newbie 4 08-26-2004 06:03 AM
service nfs start Soulful93 Linux - Networking 1 06-13-2004 02:25 AM
Service start-up n.antonio Linux - Software 2 05-02-2003 09:57 PM
Start service HiGate Linux - General 3 01-25-2003 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:49 PM.

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