[CentOS] chkconfig question
silvertip257 at gmail.com
Sat Dec 14 01:03:16 UTC 2013
On Fri, Dec 13, 2013 at 5:25 PM, Larry Martell <larry.martell at gmail.com>wrote:
> >> and I see a S64mysqld link in rc 2, 3, 4, and 5. Why in those 4 dirs?
> >> Will all scripts with - in the chkconfig entry be started at those 4
> >> levels? How is putting - different from putting 2345?
> > Runlevel 0 is poweroff. 1 is single user/maintenance mode. 4, well, no
> > actually uses 4. And 6 is reboot. So, once the network's up, text mode
> > X-mode.
> Thanks, but what was I wondering was what is the difference between
> putting - and 2345 on the chkconfig entry.
"on" defaults to enabling it in runlevels 2 through 5
Evidence in the Red Hat docs on chkconfig  in section 22.214.171.124
126.96.36.199. Enabling a Service
To enable a service in runlevels 2, 3, 4, and 5, type the following at a
shell prompt as root:
chkconfig *service_name* on
For example, to enable the httpd service in these four runlevels, type:
~]# chkconfig httpd on
To enable a service in certain runlevels only, add the --level option
followed by numbers from 0 to 6 representing each runlevel in which you
want the service to run:
chkconfig *service_name* on --level *runlevels*
For instance, to enable the *abrtd* service in runlevels 3 and 5, type:
~]# chkconfig abrtd on --level 35
> CentOS mailing list
> CentOS at centos.org
// SilverTip257 //
More information about the CentOS