Linux Learning 12

Source: Internet
Author: User

12th Linux Service Management12.1Linux Service Management-Service Classification--linux service----RPM Package Default installed service ———— standalone service ———— based on xinetd service----Source Package Installation Services-starting at self-booting? Service startup: Is to let the service run and provide functionality in the current system. Service self-booting: self-booting means having the service start automatically as the system starts and starts the service after the system is powered on or rebooted. --Query for installed services------RPM Package Installation Services? Chkconfig--list #查看服务自启动状态, you can see all the RPM package installed services to view the currently running service #ps aux|grep crond#netstat-Tlun need to use port process------Source Package Installation Services? View the service installation location, typically/usr/local/under//cannot be viewed with commands. the difference between RPM installation service and source package installation service---------is the installation location different? The source package is installed in the specified location, usually/usr/local///So just delete the installation folder when you can delete it? RPM packages are installed in the default location//-e command is removed because it is scattered in different foldersService httpd Start/etc/rc.d/Init.dservice is able to start httpd because httpd is installed in/etc/... In Service can only access/etc/... Folder source package can not be a service identification12.2.1Management of Linux service Management-rpm Services-Independent Service Management1. RPM Package Installation service location RPM is the abbreviation for Red Hat Package Manager (Red Hat packages Management)-----is the package installed in the default location?/etc/init.d/: Location of the standalone service startup script//Soft Link/ETC/RC.D/INIT.D?/etc/sysconfig/: Initialize the environment configuration file location?/etc/: (default installation file, the source package is not installed) configuration file location?/etc/xinetd.conf:xinetd configuration file?/etc/xinetd.d/: Startup scripts based on the xinetd service?/var/lib/: Where does the data generated by the service be placed?/var/log/: Log///var/... Storage of variable data2, the start of a standalone service?/etc/init.d/Standalone Service name start|stop|status|restart|? Service stand-alone name start|stop|restart| |Status//service is a red hat-specific command, the standard way to start Linux is the first3, independent service self-booting? Chkconfig [--level Run level] [standalone service name] [on|off]? Modify/etc/rc.d/rc.local file//recommended, Intuitive? Manage self-booting using the NTSYSV command12.2.2Management of Linux service Management-rpm Services-based on xinetd service management1, installing xinetd and telnet [[email protected]~]# Yum-y install xinetd [[email protected]~]# yum-y Install telnet-Server2, xinetd service start-up [[email protected]~]# vi/etc/xinetd.d/Telnet service Telnet? The name of the services is Telnet {flags= reuse? Flag is reuse, set tcp/IP SOCKET REUSABLE Socket_type=stream? Using TCP protocol Packets wait=no? Allow multiple connections to connect to user simultaneously=root? The user who started the service is root server=/usr/sbin/inch. TELNETD service startup program Log_on_failure+=userid? Log the user's ID disable after the login failed=No service does not start} restart xinetd service [[email protected]~]# Service xinetd Restart3, xinetd service self-start? [[Email protected]~]# chkconfig telnet on? ntsysv//telnet startup and self-booting are pass, the distinction is not strict, with one on it. So it's very special, it doesn't conform to the routine, it's not recommended. 12.3Linux Service Management-management of the source package service1, source package installation service startup? Use an absolute path to invoke the startup script to start. Different source packages have different startup scripts. You can view the installation instructions for the source package and see how to start the script. /usr/local/apache2/bin/apachectl start|Stop//80 Ports2, source package Service self-initiated [[email protected] ~]# vi/etc/rc.d/rc.local join/usr/local/apache2/bin/apachectl Start3, let the source package service be recognized by the Service Management command? Enable the Apache service of the source bundle to be started by the Services command management//Soft LinksLn-s/usr/local/apache2/bin/apachectl/etc/init.d/Apache? Allow the Apache service of the source package to be managed by Chkconfig and NTSYSV command self-initiated VI/etc/init.d/apache # Chkconfig: *  the  the#指定httpd脚本可以被chkconfig命令管理. The format is: Chkconfig: Run level start order close Order # Description:source package Apache #说明, content free [[email protected]~]# Chkconfig--Add Apache #把源码包apache加入chkconfig命令12.4Linux Service Management-service Management summary

Linux Learning 12

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.