1. Description
Chkconfig [-- add] [-- del] [-- list] [System Service]
Chkconfig [-- level <level code>] [System Service] [ON/OFF/Reset]
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.
2,Option
①Add to add the specified system serviceChkconfigCommand to manage it, and add relevant data in the system startup narrative file.
②Del deletes the specified system service.ChkconfigCommand management, and delete related data in the system startup description file.
③Level <level code>Specify the execution level of the read system service.
3. Others
1) the running level is the current running function level of the operating system. This level starts from 0 to 6 . /etc/inittab init main files that the Program looks for. The first services that run are placed in /etc/rc. d files in the directory.
2) running level
3: multi-user mode with network support
5. Network SupportX-WindowSupported multi-user mode
4. Example
Chkconfig -- list all system services
Chkconfig -- add httpd addedHttpdService
Chkconfig -- del httpd DeleteHttpdService
Chkconfig -- level 2345 Httpd onHttpdThe running level is2,3,4,5In this caseOn(Enabled) status.
Chkconfig -- level 5 sshd on
5. Execute similar Chkconfig rsync on The service is started immediately. However, Chkconfig -- level 345 nscd off Will not stop automatically Nscd Service, but it takes effect only after the system is restarted. You can use Service <service> <action> Command ; Where <Service> Is the service name, <Action> Is the operation action, can be Start ( Start ) , Stop ( Stop ) , Restart ( Restart ) .
6,ChkconfigCommand to add a service:
①Service scripts must be stored in/Etc/INI. d/Directory
② chkconfig -- add servicename // in chkconfig this service is added to the service list, the service is /etc/rc. d/rcN. d K/S entry
③Chkconfig -- level 35 mysqld on
Modify the default service start level.
Reference
[ 1 ] http://linux.die.net/man/8/chkconfig
[ 2 ] http://www.cnblogs.com/Vegaslee/archive/2011/01/27/1946066.html
[ 3 ] http://lugir.com/story/185.html
【4]Http:// OS .51cto.com/art/201006/207648.htm
[5]Description of/etc/inittab
http://hi.baidu.com/lianxi1999/blog/item/75c9eb0f870549eeaa64570c.html