The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Service command not working after cpanel upgrade...

Discussion in 'General Discussion' started by elitewebninja, May 13, 2004.

  1. elitewebninja

    elitewebninja Active Member

    Joined:
    Jan 2, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Atlanta Ga!
    Is anyone else having this problem?

    service httpd restart

    root@***** [~]# service httpd restart
    bash: service: command not found

    This happens on all of the service commands:
    service httpd
    service exim
    service proftpd
    service named
    service mysql

    WHM 9.2.0 cPanel 9.3.0-C4
    RedHat Enterprise 3 - WHM X v3.1.0

    Anyone know of a fix?

    Thanks,
    Scott
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Is the binary on the server?

    /sbin/service
     
  3. moFBush

    moFBush Well-Known Member

    Joined:
    Dec 31, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Really OLD topic that I need help with...

    Here is my problem:

    root@server [/sbin]# service httpd restart
    bash: service: command not found

    BUT! if I do:

    root@server [/sbin]# ./service httpd restart
    /etc/init.d/httpd restart: httpd restarted

    Whats going on with THAT?!
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You're probably using su to go from a non-priv user to root and not doing it correctly. You need to remember to use:

    su -

    The dash sets up the environment correctly.
     
  5. moFBush

    moFBush Well-Known Member

    Joined:
    Dec 31, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Thank you.
     
  6. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Sorry for digging up and old thread, but I too get "command not found" when executing "httpd configtest".

    Does anyone have a clue?

    - Simsen
     
  7. Xanimos

    Xanimos Registered

    Joined:
    Apr 25, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    When it says "bash: service: command not found" it is telling you that the command "service" is not a command it can find. It has nothing to do with what service you are trying to start/restart/etc. or whatever you are trying to accomplish with service.

    So as said before by chirpy. Check to see if the binary is there. If it isn't then make sure, if you are using su to switch users to the root user, that you use the - to set the environment correctly.
     
Loading...

Share This Page