To configuring which services are started for a runlevel, use one of three programs: chkconfig (command line only), ntsysv (simple text-based application that doesn’t require a graphical desktop), or the Service Configuration Tool (graphical application).
The chkconfig command can be used to configure runlevels and list the current runlevel configuration. It must be run as root if modifying a runlevel. Otherwise commands such as listing whether a service is started at boot time can be run as a non-root user.
To list the status of all services, execute the chkconfig --list command. A line is output for each service such as the following for the Apache HTTP Server:
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
To list the status for just one service, provide the name of the service:
chkconfig --list <service>
chkconfig –list https
To modify whether the service is turned on or off for the runlevel, specify the service name and then on, off, or reset. Set it to on to have the service started at boot time. Set it to off to have the service stopped at boot time. Setting it to reset resets the values of
all runlevels to the defaults from the initialization script. The syntax is as follows:
chkconfig <service> [on|off|reset]
chkconfig https on|off|reset
If no runlevels are given, runlevels 2, 3, 4, and 5 are modified. To only modify one or more runlevels, use the following syntax where levels is a list of runlevel numbers not separated by spaces or commas such as 35 for runlevels 3 and 5:
chkconfig —level <levels> <service> [on|off|reset]
chkconfig –level <35> https [on|off|reset]
To run the Service Configuration Tool, select Administration, Server Settings, Services from the System menu on the top panel of the desktop. Or, execute the system-configservices command. If running as a non-root user, you must enter the root password before continuing. The application allows you to configure which services are started for runlevels 3, 4, and 5. On the Background Services tab, it also allows you to start and stop services. The On Demand Services tab provides an interface for enabling or disabling any xinetd services on the system.
Runlevel 5 is configured by default. To edit a different runlevel, select it from the Edit Runlevel menu check box is selected next to each service configured to start at boot time for the runlevel. Click on a service to display a brief description of it and its status. After making any changes, click the Save button to enable the changes.