If according to daemon start and management way to differentiate, can be divided into:
1, the stand alone can be started independently;
2, Super Daemon to unified management services.
Daemon related files, as well as some important configuration files, are basically placed in these places:
/etc/init.d/*: Start Script placement
Almost all service startup scripts on the system are placed here! In fact this is the accepted catalogue, our CentOS is actually placed in the/etc/rc.d/init.d/! However, there is still a configuration of the link file to/etc/init.d/! Since this is a well-known directory, it is recommended that you remember this directory!
/etc/sysconfig/*: Initializing environment configuration file for each service
Almost all services will write the initialization of some of the options configuration to this directory, for example, the login file syslog This daemon initialization configuration is written in/etc/sysconfig/syslog here! The configuration of the network is written in the/etc/sysconfig/network file. Therefore, the document in this directory is also very important;
/etc/xinetd.conf,/etc/xinetd.d/*: Super daemon config file
Super Daemon's main profile (which is actually the default) is/etc/xinetd.conf, but as we mentioned above, Super Daemon is just a unified management mechanism, and other daemon configurations he manages are written in/etc/xinetd.d /* Inside Oh!
/etc/*: Individual configuration files for each service
/var/lib/*: Databases generated by each service
Some services that generate data will write his data to the/var/lib/directory. For example, the database management system MySQL database default is to write/var/lib/mysql/this directory!
/var/run/*: PID records for each service program
In the 17th chapter we talk about the use of signals (signal) to manage programs, since Daemon is a program, so of course you can use kill or killall to manage it! However, in order to worry about the management of other programs, so daemon will usually put their own PID record one to/var/run/! For example, the PID of the login file is recorded in the/var/run/syslogd.pid file. In this way,/etc/init.d/syslog can simply manage their own programs.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Linux system service daemon