Linux service deamon

Source: Internet
Author: User
Tags wrappers

Linux service deamon 1. There are two types: stand alone, super daemon (the xinetd deamon) www.2cto.com 2. Related directories:/etc/init. d/*: place the startup script./etc/sysconfig/*: Set the initialization environment of each service./etc/xinetd. conf,/etc/xinetd. d/*: super daemon configuration file/etc/*: configuration file of each service/var/lib/*: database generated by each service/var/run /*: PID record of each service Program/etc/services: Set port number 3, stand alone Startup Mode: service httpd start or/etc/init. d/httpd start www.2cto.com 4. super daemon startup method: query whether to start: grep-I 'disable'/etc/xine Td. d/* If/etc/xinetd is displayed. d/rsync: disable = yes, It is not started. If you want to start rsync, vim/etc/xinetd. d/rsync find disable = yes to no, and then restart the service/etc/init. d/xinetd restart or directly chkconfig rsync on, and then restart the xinetd 5 and super daemon configuration files/etc/xinetd. d/bottom and/etc/init. for parameter descriptions in d/xinetd, see other documents. 6. xinetd managed service Firewall/etc/hosts. allow,/etc/hosts. deny, as long as a service is managed by xinetd, or the program of the Service supports the TCP Wrappers function, the firewall settings of the service can be/etc/hosts. {allow, deny. In another way, as long as the software program does not support the TCP Wrappers function, the value of/etc/hosts. {allow, deny} cannot be used. How to determine whether the CP Wrappers function is available: [root @ www ~] # Ldd $ (which sshd httpd)/usr/sbin/sshd: libwrap. so.0 =>/usr/lib64/libwrap. so.0 (0x00002abcbfaed000) libpam. so.0 =>/lib64/libpam. so.0 (0x00002abcbfcf6000 ).... (omitted in the middle ).... /usr/sbin/httpd: libm. so.6 =>/lib64/libm. so.6 (0x00002ad395843000) libpcre. so.0 =>/lib64/libpcre. so.0 (0x00002ad395ac6000 ).... (omitted below ).... # Does the software support libwrap. so the function library, if any, has this function. 7./etc/hosts. allow,/etc/hosts. deny format [root @ www ~] # Vim/etc/hosts. denyrsync: 127.0.0.100 127.0.0.200: deny or [root @ www ~] # Vim/etc/hosts. denyrsync: 127.0.0.100: denyrsync: 127.0.0.200: deny/etc/hosts. allow takes precedence over/etc/hosts. deny. If neither of the two files exists, it means it is accepted without going through the firewall. ALL: indicates that ALL program_name or IP addresses are accepted. For example, ALL: deny LOCAL: indicates the meaning from the LOCAL machine. For example: ALL: LOCAL: allow UNKNOWN: indicates unknown IP address, domain, or service; KNOWN: Indicates resolved IP address, domain, and other information. For example, [root @ www ~] # Vim/etc/hosts. denyrsync: ALL 8, TCP Wrappers special function: when someone else scans my rsync port, I will remember his IP address, TCP Wrappers software is required for future query and authentication. To check whether TCP Wrappers is installed, run 'rpm-q tcp_wrappers. For more information about the usage, see. 9. Check which services are started by the system: netstat-tanlp view all service statuses: service -- status-all view startup service: chkconfig -- list | more open startup service: chkconfig deamon_name on 10. Put your service in chkconfig for management: chkconfig [-- add | -- del] [service name] a. Put the self-built service in/etc/init. d/B. The content of the Service script should be written into: # chkconfig: 35 80 70c, chkconfig -- add service name
 

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.