Chkconfig is a script that helps control the automatic startup of server daemons. It works by creating the various run level symbolic links needed to a control a service init script.
First off, the initialization script needs to be copied to /etc/rc.d/init.d.
Although chkconfig itself doesn’t require it, the script needs to be owned by root and executable:
ls -al /etc/rc.d/init.d/named
-rwxr-xr-x 1 root root 2365 Jan 18 2006 named
To start this automatically, first we have to add it to chkconfig:
chkconfig –add named
Then we can configure it to start at the appropriate run levels, usually 3, 4 and 5:
chkconfig –levels 345 named on
Disabling this service later would only require:
chkconfig –levels 345 named off
or more simply:
chkconfig –levels named off
If we want to see the sevices set to be started automatically, we can use:
chkconfig –list
Executing man chkconfig will provide the complete user documentation.