First knowledge of linux services, first knowledge of linux
1. daemon and service
In order to implement some functions, the system must provide some services. However, the provision of services always requires the running of processes. The program implementing services is called daemon ", "devil ").
1.1 Use chkconfig to view the currently enabled services:
A: First Use runlevel to view the current running level.
B: Use chkconfig to view the services enabled under the current running level
1.2 use ntsysv to view and set the service at the current running level
2. daemon Classification
2.1 stand_alone.
2.2 super_daemon: A special daemon for unified management. The daemon used to manage other daemon is called super daemon. The super daemon of my centos mini is xinetd.
If there is no xinetd, you can install it through yum install xinetd.
The response service is enabled only when there is a request from the client. After the request is completed, the service is also shut down and released, and has a security management mechanism. However, the response speed is slower.
3. daemon operations
The daemon startup scripts in centos are basically placed in these places:
/Etc/init. d/*: put almost all the service startup scripts in the system.
/Etc/sysconfig/*: the initialization environment configuration file for each service. For example, write the network settings in/etc/sysconfig/network.
/Etc/xinetd. d/*,/etc/xinetd. conf: configuration file of super daemon
3.1 start stand alone daemon
3.1.1: Start stand alone/etc/init. d /*
3.1.2: stand alone service start Method
Starting super daemon 3.2
Super daemon itself is a stand alone service, because super daemon needs to be resident in memory and manage other services. Therefore, super daemon is started in the same way as other stand alone. But the daemon managed by it cannot do this. You need to set it in the configuration file to start the daemon. These configuration files are all files in/etc/xinetd. d.
Check whether super daemon can be started:
Disable = yes indicates that the service is canceled.
For example, if you want to start telnet, you can directly modify disable = no in the/etc/xinetd. d/telnet file, and then restart the super daemon. The port used by telnet is 23.
Note that the service that enables port 23 is not telnet, but xinetd, because it needs to control telnet.