LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 11: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, 11:30 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,831
Blog Entries: 36

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
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, 02:14 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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, 02:47 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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, 12:03 PM   #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 01:34 AM
bash: service: command not found makemorebeer Linux - Software 4 04-04-2008 11:24 AM
service: command not found anjanesh Linux - Newbie 3 05-23-2006 11:37 AM
service: command not found aap Linux - Newbie 8 01-06-2006 09:15 PM
-bash: service: command not found Labyrinth Slackware 1 05-12-2004 08:13 AM


All times are GMT -5. The time now is 01:50 PM.

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