文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>chkconfig-man

chkconfig-man

时间:2007-04-23  来源:karon_fedora

CHKCONFIG(8)                                                      CHKCONFIG(8)

NAME
       chkconfig  -  updates  and queries runlevel information for system services
                                                        更新并且询问系统服务的运行登记

SYNOPSIS
       chkconfig --list [name]
       chkconfig --add name
       chkconfig --del name
       chkconfig [--level levels] name <on|off|reset>
       chkconfig [--level levels] name

DESCRIPTION
       chkconfig provides a  simple  command-line  tool  for  maintaining    
       the /etc/rc[0-6].d  directory  hierarchy by relieving system administrators
       of the task of directly manipulating the  numerous  symbolic  links  in
       those directories.

       chkconfig 提供了一个简单的命令行工具用于维护/etc/rc[0-6].d的路径层次,可以帮助系统管理员在这些路径中直接操作符号行
       PS:简单的说就是用于维护/etc/rc[0.6].d的命令行,用不着这么麻烦

       This  implementation of chkconfig was inspired by the chkconfig command
       present in the IRIX operating system. Rather than maintaining  configu-
       ration  information  outside  of the /etc/rc[0-6].d hierarchy, however,
       this version directly manages  the  symlinks  in  /etc/rc[0-6].d.  This
       leaves  all  of  the  configuration information regarding what services
       init starts in a single location.
          
       chkconfig 的执行是通过chkconfig命令激发的,此命令目前在irix操作系统中存在。甚至包括了维护/etc/rc[0-6].d层次之外的设置信息
           但是本版本命令直接管理在/etc/rc[0-6].d中的符号行,这些设置信息主要是关于哪些服务在机器启动的时候就已经运行
       PS:简单的说,就是chkconfig命令在irix操作系统中统统存在,甚至可以管理其他信息,但是我们这个说明,主要是关于那种服务在启动的时候自动运行,至于irix是sgi公司基于unix的图形工作站的应用软件,不是操作系统
          
       chkconfig has five distinct functions: adding new services for  manage-
       ment,  removing  services  from management, listing the current startup
       information for services, changing the  startup  information  for  ser-
       vices, and checking the startup state of a particular service.
      
       chkconfig有5个不同的函数:为管理器添加新服务,从管理器中移出服务,列出当前启动的服务信息,改变服务启动信息,检查特殊服务的启动状态

       When  chkconfig  is run without any options, it displays usage informa-
       tion.  If only a service name is given, it checks to see if the service
       is  configured to be started in the current runlevel. If it is, chkcon-
       fig returns true; otherwise it returns false. The --level option may be
       used  to  have  chkconfig query an alternative runlevel rather than the
       current one.
         
          当chkconfig没有任何参数运行的时候,它会显示用法信息,如果仅仅给了一个服务名称,他会去检查服务在目前的运行级别上是否被设定是可以运行的,如果可以运行的话,chkconfig返回true;不然的话返回false.--level选项被用来询问相对于目前运行等级,之外的一种运行登记
       PS:返回true就是shell里什么都没有 ,--level是用来查询服务在其他等级是否可以运行的

       If one of on, off, or reset is specified after the service  name,  chk-
       config  changes the startup information for the specified service.  The
         init script in question.

                   如果on off reset 跟在服务明后面,那么chkconfig会改变特定服务的启动信息,但是启动脚本还是被怀疑的
       PS:介绍on off reset 而已

       By  default,  the on and off options affect only runlevels 2, 3, 4, and
       5, while reset affects all of the runlevels.  The --level option may be
       used to specify which runlevels are affected.

                  默认的情况下,on和off选项只能在2.3.4,5级别下运行,而reset则在可以作用到所有的级别,--level选项可以确定那是一个级别能够起作用

       Note that for every service, each runlevel has either a start script or
       a stop script.  When switching runlevels, init  will  not  re-start  an
       already-started  service,  and  will  not re-stop a service that is not
       running.
              注意对所有的服务,每一个级别要么有一个启动脚本,要么有一个停止脚本,当改变运行级别时,启动不会重新启动一个已经运行的服务,也不会重新停止一个没有运行的服务

       chkconfig also can manage xinetd scripts via the means of xinetd.d con-
       figuration  files.  Note that only the on, off, and --list commands are
       supported for xinetd.d services.

       chkconfig同样可以管理超级守护进程经由xinetd.d的设置文件含义,注意这里仅仅可以用on 和off,并且--list命令也是支持xinetd.d服务的

OPTIONS
       --level levels
              Specifies the run levels an operation should pertain to.  It  is
              given  as  a string of numbers from 0 to 7. For example, --level
              35 specifies runlevels 3 and 5.
                                      确定相应的运行级别,这个可以用0到7,比如说 --level 35 指的是运行级别是3和5
                                    

       --add name

              This option adds a new  service  for  management  by  chkconfig.
              When  a new service is added, chkconfig ensures that the service
              has either a start or a kill entry in  every  runlevel.  If  any
              runlevel  is missing such an entry, chkconfig creates the appro-
              priate entry as specified by the  default  values  in  the  init
              script.  Note  that default entries in LSB-delimited ’INIT INFO’
              sections take precedence  over  the  default  runlevels  in  the
              initscript.
                      这个选项通过chkconfig给管理器增加一个服务的名字,当一个服务被添加的时候,chkconfig需要确定这个服务有一个开始入口或者结束入口在每一种运行级别。如果任何的一个运行级别缺少这样的入口,chkconfig会通过init脚本建立适合的入口,注意,在最低有效位界限“init info”模块中的默认入口,优先于init脚本的默认启动级别

       --del name
              The  service  is removed from chkconfig management, and any sym-
              bolic links in /etc/rc[0-6].d which pertain to it are removed.
                                     服务被从chkconfig管理中移出,并且在/etc/rc[0-6].d中相应的符号行也会被移出

              Note that future package installs for this service may run  chk-
              config  --add,  which  will re-add such links. To disable a ser-
              vice, run chkconfig name off.
                   
         --list name
              This option lists all of  the  services  which  chkconfig  knows
              about, and whether they are stopped or started in each runlevel.
              If name is specified, information in only display about  service
              name.
                     这个选项会把所有的chkconfig认识的服务统统列出来,不管他是否被停止或者开始在任何运行级别,如果服务名字给出了,那么信息仅仅显示特定服务

RUNLEVEL FILES
       Each  service which should be manageable by chkconfig needs two or more
       commented lines added to its init.d script. The first line  tells  chk-
       config  what  runlevels the service should be started in by default, as
       well as the start and stop priority levels. If the service should  not,
       by default, be started in any runlevels, a - should be used in place of
       the runlevels list.  The second line contains  a  description  for  the
       service,  and may be extended across multiple lines with backslash con-
       tinuation.

           每一个能够被chkconfig管理的服务必须要有2行或者更多的注释添加到他的init.d 脚本中,第一行告诉chkconfig服务的默认运行级别,还有运行级别的开始和结束的有限级,如果服务没有注明这些的话,那么可以在任意的级别运行,第2行是包括对于服务的描述,并且能够通过多重的反斜扛来扩充

       For example, random.init has these three lines:
       # chkconfig: 2345 20 80
       # description: Saves and restores system entropy pool for \
       #              higher quality random number generation.
                           
       This says that the random script should be started in levels 2,  3,  4,
       and 5, that its start priority should be 20, and that its stop priority
       should be 80.  You should be able to figure out  what  the  description
       says;  the \ causes the line to be continued.  The extra space in front
       of the line is ignored.

                   这个是个例子无聊的时候可以看看

SEE ALSO
       init(8) ntsysv(8) system-config-services(8)

AUTHOR
       Erik Troan <[email protected]>

4th Berkeley Distribution       Wed Oct 8 1997                    CHKCONFIG(8)

 
相关阅读 更多 +
排行榜 更多 +
迅猛兔加速器

迅猛兔加速器

游戏工具 下载
弹琴吧

弹琴吧

学习教育 下载
猿辅导

猿辅导

休闲益智 下载