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. -- Cheers, Trey ---- Dieters live life in the fasting lane. Linux fedora7.thesizemores.us 2.6.22.1-41.fc7 i686 GNU/Linux 16:51:36 up 1 day, 5:56, 2 users, load average: 0.08, 0.02, 0.01
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. --------------------------------------------------------- Sorry for the broken webmailer... Are you performing these actions as root? A user that does not have root access cannot start services. You will either need to su to root or sudo the action. --------------------------------------------------------- -- Cheers, Trey ---- Dieters live life in the fasting lane. Linux fedora7.thesizemores.us 2.6.22.1-41.fc7 i686 GNU/Linux 16:51:36 up 1 day, 5:56, 2 users, load average: 0.08, 0.02, 0.01 _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20070820/055aedee/attachment.sig>
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 -- rgds Stephen
On Monday, August 20, 2007 10:56 PM +0200 Ralph Angenendt <ra+centos at 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