Easily manage launches with CHKCONFIG

xiaoxiao2021-03-06  71

by

Xu Yongjun

Published http://www.freeelamp.com/1003237634/index_html Want to know what LINUX is the same as the MSconfig of AutoExec.Bat or Config.sys or 98? Introduction: This article provides a detailed description of many symbolic connections for Linux system administrators easily manage /tc/rc[0-6].d directory by introducing Chkconfig. Those Linux "rookie" can also learn and cognition the concept of the LINUX system through this article. Unlike DOS or Windows, Linux can have multiple runs. Common is a multi-user 2, 3, 4, 5, and many people know that 5 is the level of X-windows, and 0 is shutdown. The change of the run level can be switched through the init command. For example, suppose you want to maintain the system to enter a single user status, then you can use init 1 to switch. During the switching process of Linux's running level, the system automatically looks for the files of K and S under the directory /etc/rc[0-6].d of the run level, and perform these scripts in the following digital order. Maintenance of these scripts is a cumbersome thing, Linux provides the chkconfig command to update and query system services from different run levels. Grammatical: chkconfig --List [name] chkconfig --add namechkconfig --dl namechkconfig [--LEVEL Levels] name chkconfig [--level level] Namechkconfig has five functions: Add service, delete Services, list services, change the startup information, and check the startup state of the specific service. ChkConfig does not have a parameter run, show usage. If you add a service name, check if this service is started at the current run level. If yes, returns true, otherwise returns false. --Level option can specify the run level to view without being currently running. If ON, OFF or RESET is specified after the service name, CHKCONFIG will change the startup information of the specified service. ON and OFF refer to the service when the service changes when changing the run level. Reset refers to the initialization service information, whether there is any problem with the initialization script specified. For ON and OFF switches, the system is only valid for running grades 3, 4, 5 for running levels 3, 4, 5, but RESET can be valid for all runners. When you specify the -level option, you can select a specific run. It should be noted that for each run level, there can be only one startup script or stop script. When switching the run level, INIT will not restart the already started service, and will not stop the service that has been stopped again. Option Description: - Level Levels Specifies the run level, string composed of numbers 0 to 7, such as: - Level 35 represents specified runners 3 and 5. --Add Name This option adds a new service, ChkConfig makes sure there is a start-up (S) or kill (K) inlet. If there is any absence, it will be automatically established from the default init script. --Del Name is used to delete the service and delete the relevant symbolic connection from /etc/rc[0-6].d. --List name list, if Name is specified, just display the specified service name, otherwise list the status of all services in different runs. Running level files Each of the CHKCONFIG is required to add two rows or more comments under the corresponding init.d. The first line tells ChkConfig to default start-up and priority initiation and stop.

转载请注明原文地址:https://www.9cbs.com/read-92250.html

New Post(0)