Linux daemon and linuxdaemon

Source: Internet
Author: User
Tags syslog

Linux daemon and linuxdaemon

The daemon startup and management methods can be divided:

1. stand alone that can be started independently;

2. super daemon for centralized management of services.


Daemon-related files and some important configuration files are basically stored in these places:

/Etc/init. d/*: place the Startup Script
Almost all service startup scripts on the system are placed here! In fact, this is a recognized directory. Our CentOS is actually placed in/etc/rc. d/init. d! However, there are still configuration links to/etc/init. d! Since this is a recognized directory, we recommend that you remember this directory!

/Etc/sysconfig/*: Initialize environment configuration files for each service
Almost all services write initialization options to this directory. For example, the Initialization Configuration of the daemon in the syslog file is written to/etc/sysconfig/syslog! The network configuration is written in the/etc/sysconfig/network file. Therefore, files in this directory are also very important;

/Etc/xinetd. conf,/etc/xinetd. d/*: super daemon configuration file
The main configuration file (in fact the default value) of super daemon is/etc/xinetd. conf, but as mentioned above, super daemon is only a unified management mechanism. Other daemon configurations managed by super daemon are written in/etc/xinetd. d!

/Etc/*: configuration files of each Service

/Var/lib/*: database generated by each service
Some services that generate data write their data to the/var/lib/directory. For example, the MySQL database of the database management system is written to the/var/lib/mysql/directory by default!

/Var/run/*: PID record of each Service Program
We can use signal to manage programs in Chapter 1. Since daemon is a program, you can also use kill or killall to manage it! However, daemon usually records its PID to/var/run/to worry about affecting other programs during management! 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 easily manage its own programs.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.