Archive for November, 2007

Chapter 8 . Understanding the Boot Process 315 (Web design company)

Friday, November 30th, 2007

Chapter 8 . Understanding the Boot Process 315 Table 8-10 chkconfig Options Option Function –level A string of numbers that specifies which runlevels the requested operation effects. For example, –level 35 would specify runlevels 3 and 5. –add Adds the service to the specified runlevels. –del Removes the service from the specified runlevels. –list Lists which runlevels do and do not start this service. If no name is specified all services are reported. Another useful tool for changing runlevel information is ntsysv. It provides an easy-to-use text mode menu interface. By default it edits the current runlevel, but this can be overridden with the –level parameter. For example, to edit runlevel 5 you would use the following: [root@europa rc.d]# ntsysv –level 5 Debian startup Debian uses a similar startup routine to Red Hat and its variants, but with slightly different scripts and file placement. As we said before, Debian puts the runlevel directories rc0.d through rc6.dalong with init.d off of /etc. Once inithas been started by the kernel, it executes the first line in the inittab, which is the following: si::sysinit:/etc/init.d/rcS Instead of using a large script file to set up the base system, Debian uses the /etc/init.d/rcS script to read smaller scripts from /etc/rcS.d. The only other function of this script is to set the default path and umask. The scripts that run from rcS.dare shown below, in order. 1. S05keymaps-lct.sh. This script loads the default key maps. 2. S10checkroot.sh. This checks the root file system s constancy and then remounts it as read/write. Finally, it builds the /etc/mtab. 3. S15isapnp. This script configures any ISA Plug-and-Play devices. 4. S20modutils. This executes depmod -aand runs modprobe to load all needed modules. 5. S30checkfs.sh. This script checks the other nonroot file systems. 6. S30procps.sh. This script configures the kernel using the sysctl tool.
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Free web hosts - 314 Part II . Getting Around in Linux

Friday, November 30th, 2007

314 Part II . Getting Around in Linux 28. Generate the header file named /boot/kernel.h. 29. Create the symbolic links for /boot/System.map-kernel_version. 30. Dump the boot information gathered in to /var/log/dmesg. Once inithas processed the rc.sysinit script, it will execute any other processes configured to run at boot and then enter the default runlevel. The runlevel is entered by running the /etc/rc.d/rcscript with a parameter of the runlevel. For example, to enter runlevel 3, initwould execute the following: /etc/rc.d/rc 3 The /etc/rc.d/rc script then goes to the correct runlevel directory, in this example /etc/rc.d/rc3.d, and runs the specified script files. In runlevels 2, 3, and 5 the final script to run is S99local, which is a link to /etc/rc.d/rc.local. This script runs last and is used to do any tasks that don t really need a separate script in init.d. The default script performs the following tasks. 1. Gather system information in to several variables. 2. Create the /etc/issue file. 3. Create the /etc/issue.net file. The /etc/issue file is displayed when a user logs in to the local console. For example: Red Hat Linux release 6.2 (Zoot) Kernel 2.2.16-3 on an i686 The /etc/issue.net file is displayed when a user logs in remotely over the network. By default it is just a copy of the /etc/issuefile. Making a new version of this file that does not give out as much useful information to those who may want to break in to your system is a common practice. In the If you make a new /etc/issue.net file, remember that it will be overwritten Real World when the system is rebooted unless you modify the /etc/rc.d/rc.local script. Red Hat provides a couple of tools to help manage the runlevel directories, without having to manually make link file changes. The first is a quick tool known as chkconfig. It takes its directives from the command line. The supported parameters are shown in Table 8-10. For example, to see which runlevels the inet service is started in, you would use the following: [root@redhat rc.d]# chkconfig –list inet inet 0:off 1:off 2:off 3:on 4:on 5:on 6:off
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

Chapter 8 . Understanding the (Domain and web hosting) Boot Process 313

Wednesday, November 28th, 2007

Chapter 8 . Understanding the Boot Process 313 This script sets up some of the most basic system configuration including host- name, time, and file systems and loads needed kernel modules. The following is a complete list of the tasks that this script performs. 1. Set the default system PATH variable. 2. Check to see if the /etc/sysconfig/network file exists, and if so, set up networking. If the file does not exist, disable networking. 3. Print the welcome banner shown at boot, and prompt the user to enter Interactive boot mode. 4. Enable logging with dmesg. 5. Mount the /procfile system. 6. Configure several kernel parameters by using the sysctltool. 7. Set the system clock. 8. Load the default keymap. 9. Execute /sbin/setsysfontto configure the default system font. 10. Activate the swap partitions with the swap -acommand. 11. Set the system s hostname. 12. Configure NIS, if used. 13. Check to see if fsckneeds to be run on a volume, and if a serious error is detected, prompt the user to log in and perform the tests manually. 14. Enable quotas on the root file system. 15. Configure Plug-and-Play devices using isapnp. 16. The root file system is then remounted read/write. 17. Set up the /etc/mtab file, which lists mounted file systems. 18. Set up the /etc/HOSTNAME file. 19. Run depmod -a and set up the loadable kernel modules. 20. Load any sound modules configured. 21. Load any software RAID devices configured in /etc/raidtab. 22. Check other nonroot file systems with fsck. 23. Mount all other nonroot file systems. 24. Enable quotas on the other nonroot file systems. 25. Clean up various temporary files that are no longer needed. 26. Execute /etc/rc.d/rc.serial to configure the serial devices. 27. Load SCSI tape drive modules if detected.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Http web server - 312 Part II . Getting Around in Linux

Tuesday, November 27th, 2007

312 Part II . Getting Around in Linux Off of the root of the tree is a directory named init.d. Inside this directory are many different script files. Each of these scripts serves a specific purpose, whether it is to start a server, bring up the networking subsystem, or check files. These scripts can be used to manage the services on the system. To see which commands can be passed to a script, just execute the script with no parameters. For example: [root@redhat init.d]# ./lpd Usage: lpd {start|stop|restart|reload|status} Cross-The startup scripts are covered in more detail in Chapter 11. Reference All scripts will take the start, stop, and restart commands at a minimum. These are used to gracefully manage the service and should be used instead of running the service executable manually. Many services provide the status command, which can show useful information, such as the following: [root@redhat init.d]# ./network status Configured devices: lo eth0 Devices that are down: Devices with modified configuration: Off /etc or /etc/rc.d are directories for each runlevel named rc0.d through rc6.d. Inside the runlevel directories are link files to the scripts contained in the init.d directory. The names of the link files in the runlevel directories are not the same as the script they link to. The first letter is either an S or a K. When the system executes the scripts in the runlevel directory, it passes the start command to the scripts starting with S, and passes the stopcommand to scripts starting with K. This way you can limit which processes stay running when changing runlevels. After the first letter is a number that specifies the order the scripts are started. This way you can say that S30Syslog starts before S50inet. After the priority number is a name for the script, which is just descriptive information. Since the runlevel directories contain only links to the scripts in init.d, it is very easy to change the services and functions that happen when a new runlevel is entered. If you want to remove a service, just delete the link file. If you want to add a new service to a runlevel, you just make a symbolic link to the script file in init.d, with an S as the first letter and a priority number. Also, since all the run- levels point to the same scripts, you need to make modifications to only one file to make a change. Red Hat startup When Red Hat starts up, the first script run by init is the /etc/rc.d/rc.sysinit. It is run by the following line in the /etc/inittab file. si::sysinit:/etc/rc.d/rc.sysinit
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Chapter 8 . Understanding the Boot Process 311 (Web hosting services)

Monday, November 26th, 2007

Chapter 8 . Understanding the Boot Process 311 This line cancels the restart if the UPS detects that power has been restored. 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6 The /sbin/mingetty processes are started for runlevels 2 through 5. These provide the standard login consoles and are respawned each time they are terminated. x:5:respawn:/etc/X11/prefdm -nodaemon This line starts the graphical login processes for runlevel 5. Customizing the Boot Process The process that initfollows when it brings the system up is laid out exactly in the /etc/inittabfile. But this file does not tell the whole story; it only launches other scripts that handle most of the tasks. Most Linux distributions use many different script files to start the services and processes on the system. There are two different types of startup procedures used today: BSD and Sys V. BSD startup A couple of Linux distributions use the older BSD style of initialization; with the most popular one being Slackware. With BSD initialization the system uses a few long rc (run control) script files to set up and configure the system. These are usually named similar to /etc/rcand /etc/rc.local. The benefit of this setup is that you know where to look for most things, and all of the information is stored in the same place. The problem with BSD-style initialization is that it is harder to quickly customize. In the As the name implies, the BSD variants such as FreeBSD and OpenBSD use this Real World type of startup. Sys V startup Red Hat, its variants, and Debian all use System V initialization, known as Sys V init. This style of startup uses many small script files in a hierarchical directory structure separated into runlevels. The root of this directory tree in Red Hat is /etc/rc.d, while in Debian the root is just in /etc.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Web hosting support - 310 Part II . Getting Around in Linux

Sunday, November 25th, 2007

310 Part II . Getting Around in Linux Exam Tip The initdefault entry defines the runlevel that the system will boot into. # System initialization. si::sysinit:/etc/rc.d/rc.sysinit These lines run the /etc/rc.d/rc.sysinit script during system initialization. This script is executed before any others, and init will wait until is it completed to move on. l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 l3:3:wait:/etc/rc.d/rc 3 l4:4:wait:/etc/rc.d/rc 4 l5:5:wait:/etc/rc.d/rc 5 l6:6:wait:/etc/rc.d/rc 6 These lines tell initwhich command to run for each runlevel. For example, when the system is changed to runlevel 5, the command /etc/rc.d/rc 5 is executed. The /etc/rc.d/rc script starts the system, and by passing it the parameter of 5, it starts in runlevel 5. initwill also wait until the specified script is completed before continuing. # Things to run in every runlevel. ud::once:/sbin/update This line causes the /sbin/updatecommand to be executed once during system boot for all runlevels. # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -r now This line causes the system to execute the /sbin/shutdown -t3 -r nowcommand whenever the Ctrl-Alt-Delete key combination is entered. This is useful for trapping the signal and gracefully rebooting the system. pf::powerfail:/sbin/shutdown -f -h +2 Power Failure; System Shutting Down This line causes the system to shut down gracefully should the Uninterruptible Power Supply (UPS) signal that it has lost power. pr:12345:powerokwait:/sbin/shutdown -c Power Restored; Shutdown Cancelled
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

Submit web site - Chapter 8 . Understanding the Boot Process 309

Friday, November 23rd, 2007

Chapter 8 . Understanding the Boot Process 309 Table 8-9 inittab action Entries Action Function respawn The process will be restarted whenever it is terminated. You will see this used with the getty login processes, which need to be regenerated each time. wait The process is started once, and then init will wait until it is terminated. once The process will be executed only once, when the runlevel is entered. boot The process will be executed at boot, and any runlevel field entries will be ignored. bootwait The process is started at boot, and init will wait for it to complete before continuing. initdefault Specifies the runlevel to enter when the system is booted. sysinit This entry will be executed at boot, before any other boot or bootwait entries. The runlevel field is ignored. powerwait This entry will be processed when the power to the system goes down, as reported by a UPS. init will wait for this to complete before continuing. powerfail The same as powerwait, but init does not wait for this process to complete. powerokwait This process is executed when the power has been restored to the system. init will wait for its completion. powerfailnow This process is executed when the UPS signals to the system that the battery is almost exhausted. ctrlaltdel This entry will be processed when a user presses the Ctrl-Alt-Delete key combination. kbrequest Execute the specified process when the defined special keyboard combination is pressed. The following is an example of the /etc/inittabfile with explanations. # id:3:initdefault: Tells the system the default runlevel to start up in. As you can see, this system is probably a Red Hat system booting up in to multiuser text mode.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

308 Part II . Getting Around in Linux (Com web hosting)

Thursday, November 22nd, 2007

308 Part II . Getting Around in Linux Table 8-7 halt/reboot/poweroff Options Option Function -w Do not actually halt or reboot the system, only write the entry to /var/log/wtmp so it appears the system was halted or rebooted. -d Do not write the record to /var/log/wtmp. -f Force the halt or reboot without first calling shutdown. -i Shut down all network interfaces before doing the halt or reboot. -p Power off the system after halting. -n Do not sync the hard disks with the cache before rebooting or halting the system. This is not advised. Configuring the init process After being started by LILO, the Linux kernel executes the first process, which is init. The init process always has the process ID of 1, as shown below. USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.2 1216 520 ? S Jan12 0:04 init [2] All other processes on the system are child processes of init. When init is executed, it gets its configuration from the /etc/inittabfile. Each entry in the /etc/inittab file has the following syntax: id:runlevels:action:process Lines that begin with #symbols are comments. Table 8-8 lists the function of each field in the entry. The possible entries for the action field are shown in Table 8-9. Table 8-8 inittab Entry Fields Field Function id A string of one to four unique characters that identifies an entry in the inittab file. runlevels The list of runlevels for which the action specified in this entry should be taken. action Specifies the action to be taken. process The process to be executed.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Chapter 8 . Understanding the Boot Process 307 (Web design seattle)

Wednesday, November 21st, 2007

Chapter 8 . Understanding the Boot Process 307 Table 8-6 shutdown Options Option Function -t Tells init to wait the specified number of seconds before sending the warning and kill commands to processes. -k Does not actually shut down the system, but only sends the warning. -r Reboots the system after shutdown. -h Halts the system after shutdown. -f Skips the fsck check on reboot. -F Forces a fsck check on reboot. -c Cancels a shutdown.

306 Part II . Getting Around in Linux (Msn web hosting)

Tuesday, November 20th, 2007

306 Part II . Getting Around in Linux Table 8-5 Red Hat Runlevels Runlevel Function 0 Changing to this runlevel causes the system to halt. 1 Takes the system to single-user mode, which is normally used for troubleshooting. 2 Multiuser, but no networking support. 3 The standard runlevel for networked multiuser text login. 4 Undefined. 5 The standard runlevel for multiuser GUI login. 6 Reboots the system. Exam Tip The runlevel can be changed using either init or telinit. Debian has the same configuration for runlevels 0, 1, and 6. But, by default the normal runlevel used to boot the system for text or GUI is 2, and the rest are undefined. The undefined runlevels are free for the user to set up as they wish. Any of the run- levels can be modified as well. The runlevel of the system can be changed with the init and telinitcommands. For example, to change to runlevel 2 you would use either of the following: debian:~# init 2 or debian:~# telinit 2 Tip The telinit command is actually a link to /sbin/init, to provide for compat ibility with other UNIX systems. The shutdown and reboot commands are also used to change the runlevels. They take the system to runlevel 0, 1, or 6. Table 8-6 shows the command-line options for shutdown. The syntax for the shutdown command is as follows: /sbin/shutdown [-t sec] [-arkhncfF] time [warning-message]
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.