How do I turn services on/off in Linux?



  • To turn the httpd service on at levels 3,4 and 5:

    # /sbin/chkconfig --level 345 httpd on
    

    To check:

    # /sbin/chkconfig --list httpd
    httpd           0:off   1:off   2:off   3:on    4:on    5:on    6:off
    

    To turn off:

    # /sbin/chkconfig httpd off
    

    To check:

    # /sbin/chkconfig --list httpd
    httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
    

    To turn off level 3 only:

    # /sbin/chkconfig --level 3  httpd off
    

    To check:

    # /sbin/chkconfig --list httpd
    httpd           0:off   1:off   2:off   3:off   4:on    5:on    6:off
    

Log in to reply
 

© Lightnetics 2024