Controlling Services in Linux servers

Controlling Services in Linux servers

The below tools/ commands are used to control the services in linux servers

    1.ntsysv
    2.chkconfig
    3.redhat-config-services
    4.service

ntsysv:   simple interface for configuring runlevels.

       A. It is a console based interactive utility that allows you to control what services run when entering a given run level. It configures the current run level by default. By using the --level option, you can configure other run levels.
       B. ntsysv returns 0 on success, 2 on error, and 1 if the user cancelled (or backed out of) the program. 


    
       
chkconfig: 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.

         usage:  chkconfig --list [name]
                      chkconfig --add
                      chkconfig --del
                      chkconfig [--level ] )

redhat-config-services: It is an X client.It will give the display of each of the services that are started and stopped at each run level.
                        Services can be added, deleted, or re-ordered in the run levels 3 through 5 with this utility.

service:   It is used to start or stop a standalone service immediately. Most services accept the arguments start, stop, restart, reload, condrestart and status.

         usage:  service --status-all
                     service --status-all | grep ntpd
                     service [start|stop|restart|status]
                     service vsftpd restart

List services and their open ports

              # netstat -tulpn



Post a Comment

0 Comments