Classification of Linux Services
Independent service
RPM Package default installation of services <
Linux Services < based XINETD Services
Source Package Installation Services
Querying for Installed services
RPM Package Installation Services: Chkconfig--list
Source Package Installation Services: Check the service installation location, generally in/usr/local
/etc/init.d/: Start Script location
/etc/sysconfig/: Initializing the location of the environment configuration file
/etc/: Configuration file location
/etc/xinetd.conf:xinted configuration file
/ETC/XINETD.D startup scripts based on XINETD services
/var/lib/: Location of data storage generated by the service
/var/log/: Log
Start of a standalone service
/etc/init.d/Standalone server name Start|stop|status|restart
Server Standalone Service name Start|stop|status|restart
Self-priming for standalone services
Chkconfig [--level RunLevel] [standalone service name] [On|off]
Modify/etc/rc.d/rc.local
Managing self-booting using the NTSYSV command
Installing XINETD
Yum-y Install xinetd
XINETD Service Start-up
[Email protected] etc]# vim/etc/xinetd.d/telnet
Self-booting of the XINETD service
Chkconfig Telnet on
Ntsysv
Startup of the source package installation Service
Use absolute path, invoke startup script to start, different source package startup script is different. You can view the installation instructions for the source package and see how to start the script
Self-booting of the source package service
Vim/etc/rc.d/rc.local Join
Usr/local/apache2/bin/apachectl start
Allow the Apache service of the source bundle to be managed by service commands
Ln-s/usr/local/apache2/bin/apachectl/etc/init.d/httpd
Allow the Apache service of the source package to be chkconfig and NTSYSV command Management self-initiated
Vim/etc/init.d/httpd
#chkconfig: 35 11 22
#指定httpd脚本可以被chkconfig管理, in the format: run-level start order shutdown sequence
#启动顺序和关闭顺序不能和其他应用程序启动 | Close in the same order
#source Package Apache2 #说明
Add the source package to Chkconfig
Chkconfig--add httpd
Linux Service Management