LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   start and stop services (https://www.linuxquestions.org/questions/linux-general-1/start-and-stop-services-50914/)

log 03-20-2003 07:51 PM

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 :)

Crashed_Again 03-20-2003 07:54 PM

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

nakkaya 03-20-2003 08:46 PM

another way is to use redhat-config-services tool or setup

Crashed_Again 03-20-2003 08:49 PM

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?

Capt_Caveman 03-20-2003 09:22 PM

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.

fsbooks 03-20-2003 09:39 PM

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.

Road 03-21-2003 05:44 PM

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

log 03-21-2003 08:29 PM

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 :)


All times are GMT -5. The time now is 04:22 AM.