11.01.2015 Views

Red Hat Enterprise Linux Installation Guide 5.2 - linux.meuhobby.com

Red Hat Enterprise Linux Installation Guide 5.2 - linux.meuhobby.com

Red Hat Enterprise Linux Installation Guide 5.2 - linux.meuhobby.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Running Additional Programs at Boot Time<br />

prompt, accepts the user's username and password, and initiates the login process.<br />

In runlevel 5, the /etc/inittab runs a script called /etc/X11/prefdm. The prefdm script<br />

executes the preferred X display manager 3 — gdm, kdm, or xdm, depending on the contents of<br />

the /etc/sysconfig/desktop file.<br />

Once finished, the system operates on runlevel 5 and displays a login screen.<br />

3. Running Additional Programs at Boot Time<br />

The /etc/rc.d/rc.local script is executed by the init <strong>com</strong>mand at boot time or when<br />

changing runlevels. Adding <strong>com</strong>mands to the bottom of this script is an easy way to perform<br />

necessary tasks like starting special services or initialize devices without writing <strong>com</strong>plex<br />

initialization scripts in the /etc/rc.d/init.d/ directory and creating symbolic links.<br />

The /etc/rc.serial script is used if serial ports must be setup at boot time. This script runs<br />

setserial <strong>com</strong>mands to configure the system's serial ports. Refer to the setserial man page<br />

for more information.<br />

4. SysV Init Runlevels<br />

The SysV init runlevel system provides a standard process for controlling which programs init<br />

launches or halts when initializing a runlevel. SysV init was chosen because it is easier to use<br />

and more flexible than the traditional BSD-style init process.<br />

The configuration files for SysV init are located in the /etc/rc.d/ directory. Within this<br />

directory, are the rc, rc.local, rc.sysinit, and, optionally, the rc.serial scripts as well as<br />

the following directories:<br />

init.d/ rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/<br />

The init.d/ directory contains the scripts used by the /sbin/init <strong>com</strong>mand when controlling<br />

services. Each of the numbered directories represent the six runlevels configured by default<br />

under <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>.<br />

4.1. Runlevels<br />

The idea behind SysV init runlevels revolves around the idea that different systems can be used<br />

in different ways. For example, a server runs more efficiently without the drag on system<br />

resources created by the X Window System. Or there may be times when a system<br />

administrator may need to operate the system at a lower runlevel to perform diagnostic tasks,<br />

like fixing disk corruption in runlevel 1.<br />

The characteristics of a given runlevel determine which services are halted and started by init.<br />

2 Refer to the <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> Deployment <strong>Guide</strong> for more information about tty devices.<br />

3 Refer to the <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> Deployment <strong>Guide</strong> for more information about display managers.<br />

343

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!