I just did an install of CentOS 5 on one of my machines. However, when I try to use the 'service' command (such as 'service httpd start') I get an error that the service command is not found.
Why would that be? Where does this command come from? I can launch the services just fine using the respective /etc/init.d/ entries.
Trey Sizemore wrote:
I just did an install of CentOS 5 on one of my machines. However, when I try to use the 'service' command (such as 'service httpd start') I get an error that the service command is not found.
It's "su -", not just "su" - see the su and the bash man pages for an explanation.
Ralph
On Monday, August 20, 2007 10:56 PM +0200 Ralph Angenendt ra+centos@br-online.de wrote:
Trey Sizemore wrote:
I just did an install of CentOS 5 on one of my machines. However, when I try to use the 'service' command (such as 'service httpd start') I get an error that the service command is not found.
It's "su -", not just "su" - see the su and the bash man pages for an explanation.
One of the routine edits I do to /etc/profile is to add the sbin directories to all users' path. I don't see value in keeping those directories out of the path. I suppose in a more coddling environment one could invoke pathmunge only for those users in a power users group. (The edit is to comment out the "if" and "fi".)
# Path manipulation # [KAP] add sbin to all users' paths #if [ "$EUID" = "0" ]; then pathmunge /sbin pathmunge /usr/sbin pathmunge /usr/local/sbin #fi
On Mon, Aug 20, 2007 at 04:54:11PM -0400, Trey Sizemore wrote:
I just did an install of CentOS 5 on one of my machines. However, when I try to use the 'service' command (such as 'service httpd start') I get an error that the service command is not found.
Why would that be? Where does this command come from? I can launch the services just fine using the respective /etc/init.d/ entries.
/sbin/service (from initscripts)
Either type the full command line or make sure it's on your PATH
eg sudo /sbin/service httpd start
On Mon Aug 20, 2007 04:57PM, Stephen Harris wrote:
On Mon, Aug 20, 2007 at 04:54:11PM -0400, Trey Sizemore wrote:
I just did an install of CentOS 5 on one of my machines. However, when I try to use the 'service' command (such as 'service httpd start') I get an error that the service command is not found.
Why would that be? Where does this command come from? I can launch the services just fine using the respective /etc/init.d/ entries.
/sbin/service (from initscripts)
Either type the full command line or make sure it's on your PATH
eg sudo /sbin/service httpd start
Thanks to both of you!. That did the trick.