LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2012, 10:01 PM   #1
aneetaa
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
Arrow service : command not found in RHEL 5


service:command not found in RHEL 5..please help
 
Old 09-03-2012, 10:30 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
You want /etc/init.d/[servicename] command.

For instance for mysql in RHEL 5,
Code:
/etc/init.d/mysqld status
 
1 members found this post helpful.
Old 09-04-2012, 01:14 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
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
 
Old 09-04-2012, 01:47 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Maybe an open door, but are you root when trying to run this command? Normal users do not have access to this command.
 
Old 09-04-2012, 11:03 AM   #5
aneetaa
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
thnx to all
 
  


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
Restart services - 'service' command not found davee Linux - Newbie 9 03-16-2013 12:34 AM
bash: service: command not found makemorebeer Linux - Software 4 04-04-2008 10:24 AM
service: command not found anjanesh Linux - Newbie 3 05-23-2006 10:37 AM
service: command not found aap Linux - Newbie 8 01-06-2006 08:15 PM
-bash: service: command not found Labyrinth Slackware 1 05-12-2004 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration