vb net barcode printing code 11: Managing the Linux Boot Process in Software

Maker Code 128B in Software 11: Managing the Linux Boot Process

11: Managing the Linux Boot Process
Code 128 Printer In None
Using Barcode encoder for Software Control to generate, create Code 128 image in Software applications.
Code 128B Decoder In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
With this background in mind, you re ready to learn how to manage runlevels on your system Let s do that next
Code128 Generation In C#.NET
Using Barcode maker for VS .NET Control to generate, create Code 128C image in VS .NET applications.
Printing Code 128 In .NET
Using Barcode maker for ASP.NET Control to generate, create Code 128 image in ASP.NET applications.
Managing Runlevels
Code-128 Creator In Visual Studio .NET
Using Barcode printer for .NET Control to generate, create Code 128B image in VS .NET applications.
Paint Code 128 Code Set B In Visual Basic .NET
Using Barcode creation for VS .NET Control to generate, create Code 128A image in VS .NET applications.
Managing runlevels is a very important aspect of administering a Linux system You need to know how to configure the default runlevel as well as specify which system processes (daemons) are automatically started at a particular runlevel Recall in the preceding chapter that I mentioned that one of the first things I do after installing a new Linux system is to go through and turn off all of the unneeded services that run automatically This saves memory and CPU utilization and also can plug up security holes in the system In this part of the chapter, we re going to discuss how this is done We ll cover the following topics:
EAN-13 Supplement 5 Maker In None
Using Barcode generator for Software Control to generate, create EAN-13 image in Software applications.
Bar Code Printer In None
Using Barcode creation for Software Control to generate, create bar code image in Software applications.
Configuring the default system runlevel Changing runlevels from the shell prompt Configuring services to run by default at a specified runlevel
Generate Data Matrix 2d Barcode In None
Using Barcode creation for Software Control to generate, create Data Matrix 2d barcode image in Software applications.
GS1 128 Maker In None
Using Barcode maker for Software Control to generate, create EAN / UCC - 13 image in Software applications.
Let s begin by learning how to configure the default system runlevel
Painting Code-39 In None
Using Barcode maker for Software Control to generate, create Code39 image in Software applications.
Barcode Creator In None
Using Barcode generator for Software Control to generate, create barcode image in Software applications.
Configuring the Default System Runlevel
Create Leitcode In None
Using Barcode generation for Software Control to generate, create Leitcode image in Software applications.
Barcode Encoder In None
Using Barcode encoder for Font Control to generate, create bar code image in Font applications.
As you saw earlier in this chapter, the system s default runlevel is specified in the /etc/inittab file, shown in Figure 11-23 You can change this by simply changing the second value in the command to the default runlevel you want to use For example, suppose I wanted to change my system from the default runlevel of 5, shown in Figure 11-23, to a default runlevel of 3 I would simply open /etc/inittab in a text editor and change the value 5 to a value of 3 After saving the file and rebooting, the system would boot into runlevel 3 In addition to changing runlevels at boot time, you can also change them on the fly as you re using the system Let s discuss how this is done next
GTIN - 12 Generator In Java
Using Barcode creator for Eclipse BIRT Control to generate, create UCC - 12 image in BIRT reports applications.
Print 2D Barcode In C#.NET
Using Barcode maker for Visual Studio .NET Control to generate, create Matrix Barcode image in .NET framework applications.
Changing Runlevels from the Shell Prompt
Create Linear Barcode In Visual C#.NET
Using Barcode drawer for .NET framework Control to generate, create Linear image in VS .NET applications.
GS1 - 12 Maker In Objective-C
Using Barcode generator for iPad Control to generate, create UPC Code image in iPad applications.
If you think changing the default runlevel is easy, changing runlevels on the fly is even easier This is done with the init command The syntax for using init is init runlevel For example, if my system is running in runlevel 5 and I want to switch to runlevel 3, I can simply enter init 3 at the shell prompt You have to switch to your root user before you can run the init command
Bar Code Printer In C#.NET
Using Barcode encoder for Visual Studio .NET Control to generate, create bar code image in .NET framework applications.
Create Matrix 2D Barcode In .NET Framework
Using Barcode drawer for ASP.NET Control to generate, create 2D Barcode image in ASP.NET applications.
Manage Linux Runlevels
FIGURE 11-23
Setting the default runlevel
After entering the command, the system switches to runlevel 3, as shown in Figure 11-24 When you change runlevels with the init command, the init process runs the rc script and tells it to switch to the appropriate level The rc script reads /etc/inittab for the current runlevel and stops all of the services associated with that runlevel using the scripts in the appropriate runlevel directory in your init directory The rc script reads /etc/inittab and runs the appropriate start scripts in the new runlevel s directory in the init directory
11: Managing the Linux Boot Process
If you look inside an rcxd directory within your distribution s init directory, you will see two scripts for each system process One starts with an S and one starts with a K The scripts that start with S are used to start a process while the scripts that start with K are used to kill a process These are the scripts employed when switching between runlevels on the fly as just described If you enter init 0 or init 6 at the shell prompt, the system will halt (init 0) or reboot (init 6) Finally, let s review the process for configuring services to run at system boot
FIGURE 11-24
Changing to runlevel 3 on the fly
Manage Linux Runlevels
Configuring Services to Run by Default at a Specified Runlevel
Earlier, we talked about using the bootlocal and rclocal scripts to automatically run a command at system boot Notice, however, that we said these scripts are used to run commands, not system services (daemons) If you want to configure a system service to run automatically at boot, you must associate it with a system runlevel and specify whether the service will be turned off or on Whenever you install a daemon, whether during system installation or by using the rpm utility, an init script is copied to your init directory (/etc/initd or /etc/rcd/ initd) You can use the chkconfig command to configure which runlevels each of your init scripts are associated with If you want to view a service s configuration, enter chkconfig l daemon_name at the shell prompt You can also enter chkconfig l to see the status of all daemons installed on your system For example, in Figure 11-25, the chkconfig l ntp command has been issued As you can see in Figure 11-25, the ntp service has been configured to not automatically start at any runlevel However, suppose we wanted the ntp daemon to run automatically at runlevels 3 and 5 We could make this happen by entering chkconfig s ntp 35 This specifies that the ntp service (specified by the s option) be enabled at runlevels 3 and 5 This is shown in Figure 11-26 To disable a service, enter chkconfig service_name off For example, to disable the ntp service enabled in Figure 11-26, you would enter chkconfig ntp off
FIGURE 11-25
Copyright © OnBarcode.com . All rights reserved.