chkconfig

The chkconfig command can also be used to activate and deactivate services.
chkconfig command is used to change, update and query runlevel information for system services. chkconfig is an admin command.
 
Options:-


--add service Create a start or kill symbolic link in every runlevel for the specified service according to default behavior specified in the service's initialization script. 
--list Print whether the specified service is on or off in each level. If no service is specified, print runlevel information for all services managed by chkconfig.
--level numbers Specify by number the runlevels to change. Provide numbers as a numeric string: e.g., 0,1,2,3,4,5,6 for levels. Use this to override specified defaults.
--del service Remove entries for specified service from all runlevels.


  1. chkconfig --list
    The above configuration command list the runlevels and the service status(i.e, on or off).
  2. chkconfig mysqld off
    The above command is used to Turnoff the mysqld services from all runlevels.
  3. chkconfig --list mysqld
     
  4. Output:
    mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    
    The above command displays the status of mysqld service(i.e, on or off).

0 comments:

Post a Comment