LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2003, 07:51 PM   #1
log
Member
 
Registered: Dec 2002
Location: South Australia
Distribution: Gentoo
Posts: 113

Rep: Reputation: 15
start and stop services


Hi, im using red hat 8.0 with X, and its fine if i want to start or stop a service by using the service manager.

But im going to install it on another computer (P166) without X and i am wondering how to start and stop services without using the service manager?

How does red hat register a service as a service anyway?

yer, im a newbie, but im learning stuff every day
 
Old 03-20-2003, 07:54 PM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Ummm...to stop a service from being on or off at startup you would use the chkconfig command:

chkconfig --levels 3 httpd off

man chkconfig for more options. If you want to just shut off a service you can usually use the scripts in /etc/init.d:

/etc/init.d/httpd stop

You can also do:

/etc/init.d/httpd start
or
/etc/init.d/httpd restart
 
Old 03-20-2003, 08:46 PM   #3
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
another way is to use redhat-config-services tool or setup
 
Old 03-20-2003, 08:49 PM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Quote:
But im going to install it on another computer (P166) without X and i am wondering how to start and stop services without using the service manager?
Does that tool run without X?
 
Old 03-20-2003, 09:22 PM   #5
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
You can also use:

service httpd stop
service httpd start
service httpd restart

to temporarily stop or start services, though they will resume on reboot to whatever chkconfig is set to. I think these actually do the same thing as Crashed_Agains /etc/init.d scripts.
 
Old 03-20-2003, 09:39 PM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
Yup, service is just a shell script that calls the /etc/init.d scripts. But the potential advantage is that /sbin (where lies service) is by default in the root path.
 
Old 03-21-2003, 05:44 PM   #7
Road
Member
 
Registered: Jan 2002
Distribution: Debian Based only but have tried most others.
Posts: 82

Rep: Reputation: 15
Like everyone else said, use

service (service name) (Stop,Start,Restart)

All the start and stop scripts are located in /etc/init.d directory so you could just go there and type the script name and either stop and start.

Man chkconfig if you want to change what runlevel each service runs at. So if it's a console only box and no GUI you want to have it on for runlevl 3, and if it's a gui box have it on for both 3 and 5.

Road
 
Old 03-21-2003, 08:29 PM   #8
log
Member
 
Registered: Dec 2002
Location: South Australia
Distribution: Gentoo
Posts: 113

Original Poster
Rep: Reputation: 15
thanks for your help guys.

hmm, now the next wall that i have come up to, ill do a search for it before i post
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO Check, Start and Stop Services GNewbie MEPIS 9 08-22-2012 10:09 PM
stop and start services hoover93 SUSE / openSUSE 5 12-29-2004 02:48 PM
Gentoo: start / stop services Adony Linux - Newbie 5 12-10-2004 09:39 AM
Start and stop services in SUSE - using shell UltimaGuy Linux - Newbie 3 02-16-2004 10:13 PM
Start Stop Restart Services Sifvion Slackware 6 09-14-2002 03:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:08 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
Open Source Consulting | Domain Registration