1. Linux Service classification
1> Independent Monitoring Service (system service)
Once started, the service will always run in the background, listening for client access and continuously consuming resources. Each service has an independent listener script, placed under/etc/init.d/, which has a service for XINETD services, responsible for the management of various temporary services.
2> Temporary Services
To use temporary services, you need to start the XINETD service, and the XINETD service will continue to run in the background. All temporary services are managed by the XINETD service, which is called by the XINETD service when the client requests access to the temporary service. The temporary service has no executable script and has its own configuration file under/etc/xinetd.d/. Determine whether to start the temporary service by using the "Disable" field in the configuration file.
2. Independent Service Control
Mode one: Service [services name] [Control parameter: Start|stop|restart|status|reload]
Mode two:/etc/init.d/[service name] [Control parameter: Start|stop|restart|status|reload]
For example, control Crond service restart:
3, chkconfig Command Control service boot-up status
Command format: chkconfig [service name] Off|on
--list//View switch status of the service
--level [RunLevel] Off|on//Set the service to on and off status at a certain runlevel
4, RHEL6 of the operating level
Vim/etc/inittab
# Default RunLevel. The runlevels used is:
# 0-halt (do not set Initdefault to this) shutdown
# 1-single User Mode single
# 2-multiuser, without NFS (the same as 3, if you don't have networking) character interface multi-user mode (network not supported)
# 3-full multiuser mode character interface for full multi-user
# 4-unused not assigned to use
# 5-x11 graphical interface for multi-user mode
# 6-reboot (do not set Initdefault to this) reboot
#
Id:5:initdefault: The system automatically enters a different operating level after it is switched on by modifying the ID value
View Run Level: RunLevel
Temporarily switch Run Level: init level
Linux User Management-service service management