Starting and stopping services is easy in Red Hat Enterprise Linux 6 and its derivative CentOS 6. Both includes the Service Configuration tool which simplifies service administration.
Manage Services (RHEL 6)
This section describes how to manage the services using the Service Configuration tool.

1. Click System, select Administration, and click Services. This will launch the Service Configuration window.
2. In the Service Configuration window, select the service you wish to run when the system starts and click Enable.
Make sure xinetd is running if you enable any on demand services.Manage Services (RHEL 5)
This section describes how to manage the services using the Service Configuration tool.

1. Click System, select Administration, select Server Settings and click Services. This will launch the Service Configuration window.

Make sure xinetd is running if you enable any On-Demand Services. You can find xinetd in the Background Services tab.Manage Services (Console)
Listed below are the console commands to manage the services. You need to have root level access to use the commands below.
| Task | |
|---|---|
| RHEL/CentOS | Ubuntu |
| Display all the available services | |
/sbin/chkconfig ––list |
N/A |
Enable the service |
|
/sbin/chkconfig [name] on |
/usr/sbin/update-rc.d [name] defaults |
Disable the service |
|
/sbin/chkconfig [name] off |
/usr/sbin/update-rc.d -f [name] |
Start the background service |
|
/sbin/service [name] start |
/usr/sbin/service [name] start |
Stop the background service |
|
/sbin/service [name] stop |
/usr/sbin/service [name] stop |
Restart the background service |
|
/sbin/service [name] restart |
/usr/sbin/service [name] restart |
Display the background service status |
|
/sbin/service [name] status |
/usr/sbin/service [name] status |
Visit the forum to ask for help or to give a comment.
***
Posted on 7/20/2011 and last updated on 9/14/2011
Filed under CentOS 5 , CentOS 6 , Red Hat Enterprise Linux 5 , Red Hat Enterprise Linux 6 , System Administration , Ubuntu 10.04


