mirror of https://github.com/tLDP/LDP
- about chkconfig
This commit is contained in:
parent
2bf9d5c137
commit
cf0f87694a
|
@ -91,6 +91,59 @@ Bringing up interface eth0.........................................[ DONE ]
|
|||
Bringing up interface eth1.........................................[ DONE ]
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Every subsystem script contains information in what runlevels
|
||||
that subsystem should be started by default with line like this
|
||||
(example line from <filename>/etc/rc.d/init.d/syslog</filename> subsystem):
|
||||
<programlisting# chkconfig: 2345 30 70></programlisting>
|
||||
This tells rc-scripts to run the subsystem when entering runlevels
|
||||
2, 3, 4, 5 (and respectively, to stop subsystem when leaving one of these
|
||||
runlevels). Numbers 30 and 70 are priority levels for start/stop.
|
||||
See <citerefentry>
|
||||
<refentrytitle>chkconfig</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry> for details.
|
||||
</para>
|
||||
<para>
|
||||
Set of subsystems/services run in particular runlevel can be changed
|
||||
with <command>chkconfig</command> command.
|
||||
Some examples:
|
||||
<programlisting>
|
||||
] # list current status
|
||||
] # asterisks (***) means the service/subsys is started/stopped in runlevel
|
||||
]
|
||||
] chkconfig --list
|
||||
gpm 0:--- 1:--- 2:*** 3:*** 4:*** 5:*** 6:---
|
||||
network 0:--- 1:--- 2:*** 3:*** 4:*** 5:*** 6:---
|
||||
httpd 0:--- 1:--- 2:--- 3:*** 4:*** 5:*** 6:---
|
||||
random 0:--- 1:*** 2:*** 3:*** 4:*** 5:*** 6:---
|
||||
qmail 0:--- 1:--- 2:*** 3:*** 4:*** 5:*** 6:---
|
||||
single 0:--- 1:*** 2:--- 3:--- 4:--- 5:--- 6:---
|
||||
klogd 0:--- 1:--- 2:*** 3:*** 4:*** 5:*** 6:---
|
||||
console 0:--- 1:--- 2:--- 3:*** 4:*** 5:*** 6:---
|
||||
sshd 0:--- 1:--- 2:--- 3:*** 4:*** 5:*** 6:---
|
||||
nfsfs 0:--- 1:--- 2:--- 3:*** 4:*** 5:*** 6:---
|
||||
timezone 0:--- 1:--- 2:*** 3:*** 4:*** 5:*** 6:---
|
||||
syslog 0:--- 1:--- 2:*** 3:*** 4:*** 5:*** 6:---
|
||||
rc-inetd 0:--- 1:--- 2:--- 3:*** 4:*** 5:*** 6:---
|
||||
|
||||
] # exclude sshd service from runlevels 345
|
||||
] chkconfig sshd off
|
||||
|
||||
] # include sshd service in runlevels 345 again
|
||||
] chkconfig sshd on
|
||||
</programlisting>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Removing/adding service to runlevel takes effect next time the
|
||||
runlevel is changed.
|
||||
It does not automatically start subsystem if one is not running,
|
||||
or stop it if it's already running.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</para>
|
||||
</section>
|
||||
<section id="runlevels">
|
||||
<title>Changing runlevels</title>
|
||||
|
|
Loading…
Reference in New Issue