Linux Service Management

Source: Internet
Author: User

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

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.