Controlling Services in Linux

–> Controlling services

service management tools:

1 .chkconfig

.it is noninteractive tool that can be used in shell scripts.

.xinetd-based services comes into immediate effect if actived/de-activated

with this tool.

.Stand-Alone service comes into effect only on next rebootif

activated/de-activated using this tool. [to avoid reboot, use ‘service

command’

2. Service

.It is used to activate/de-activate stand-alone services for the current

session only.

Other tools

————–

#redhat-config-services — GUI-based tool

#ntsysv – text based interactive tool.

Note: The location of service package

/etc/xinetd.d  ( dependencies services)

/etc/rc.d/init.d (stand-alone services )

#chkconfig –list telnet status

#service xinetd status

#chkconfig –list telnet

#chkconfig –list xinetd

#chkconfig –list (displays status of all the services)

#chkconfig –list (service_name ie. telnet) — Displays the status of the

specified service

#chkconfig <xinetd_based service ie. telnet ) on/off — To activate/de-activate                                                         xinetd

#service xinetd status [must be running for xinetded services to work

#chkconfig <stand-alone_service> on/off — Activate/De-activate the stand-alone                                            service

. Effect on next reboot only.

#chkconfig <runlevel> <standalone service> on/off

Runlevel defines only for the particular runlevel ie runlevel

2,3,4,5

#chkconfig –level <runlevels> <stand-alaone service> on/off

ie. #chkconfig –level 35 xinetd on (its run only runlevel 3 and 5)

check after #service xinetd status

#service <stand-alone-service> status/stop/start/restart/reload (syntax of                                                                   service command)

******************************************************************************