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 :) |
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 |
another way is to use redhat-config-services tool or setup
|
Quote:
|
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. |
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.
|
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 |
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 08:48 PM. |