LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   service : command not found in RHEL 5 (https://www.linuxquestions.org/questions/linux-newbie-8/service-command-not-found-in-rhel-5-a-4175425510/)

aneetaa 09-03-2012 10:01 PM

service : command not found in RHEL 5
 
service:command not found in RHEL 5..please help

sag47 09-03-2012 10:30 PM

You want /etc/init.d/[servicename] command.

For instance for mysql in RHEL 5,
Code:

/etc/init.d/mysqld status

chrism01 09-04-2012 01:14 AM

This is for RHEL/Centos6, but should be essentially the same for RHEL5
Code:

which service
/sbin/service

yum provides /sbin/service

initscripts-9.03.31-2.el6.centos.x86_64 : The inittab file and the /etc/init.d
                                        : scripts
Repo        : base
Matched from:
Filename    : /sbin/service

initscripts-9.03.31-2.el6.centos.x86_64 : The inittab file and the /etc/init.d
                                        : scripts
Repo        : installed
Matched from:
Other      : Provides-match: /sbin/service

In short you need to
Code:

yum install initscripts
Its extremely unusual for it not to be installed already

druuna 09-04-2012 01:47 AM

Maybe an open door, but are you root when trying to run this command? Normal users do not have access to this command.

aneetaa 09-04-2012 11:03 AM

thnx to all


All times are GMT -5. The time now is 12:23 AM.