In the run mode to start the service to run in a mode to join a startup service, you first create the service startup script, and then put it in/etc/init.d/or/etc/rc.d/init.d (depending on your linux version), to set the startup script and run mode, you need the run mode to set up a directory and start the script/etc/rc.d/init.d/symboliclink, filename prefix usually SXX, XX is a number, this number is used to control the operation mode of the boot sequence.
Script execution sequence is performed in ascending order according to the size of the numbers is a digital as small as possible to do, here's a during run mode to start the service specific examples: $ cpmyservice/etc/rc.d/init.d/$ ln-s/etc/rc.d/init.d/myservice/etc/rc3.d/S99myservice, next to runlevel3 starts, myservice will start automatically. To a runlevel starts you are able to develop the Access startup runlevel, if your system is using the lilo boot order in the appropriate sections as: LILO: linux5 if you are using GRUB, the boot time you can press the e key to enter setup mode, the appropriate location: kernel/vmlinuzroroot =/dev/hda15Linux run level Category: linux, Author: admin, Popularity: 74% of the Linux operating system since starts to boot up need to go through several different phases, the stage is called runlevel, likewise, when linux operating system shuts down or goes through several different runlevel, we prepare detailed below introduce the runlevel, and show you some tricks to make your linux system to avoid unnecessary restarts. Runlevel can be thought of as the system state, image, you can view runlevel a bit like Microsoft's windows operating system's Normal, safemode, and Commandpromptonly. Enter each runlevel all need to start or close the corresponding a range of services (services), these services (services) to initialize the script is placed in the directory/etc/rc.d/rc?. D/or/etc/rc?. D the following (? represents the corresponding ordinal runlevel). In most Linux distributions, usually there are 8 runlevelRunlevelSystemState0Haltthesystem1Singleusermode2Basicmultiusermode3Multiusermode5Multiusermodewit GUI6RebootthesystemS, sSingleusermode *** ** following excerpted from RedHatEnterpriseLinux5 (/etc/inittab) # Defaultrunlevel.TherunlevelsusedbyRHSare: # 0-halt (DoNOTsetinitdefaulttotis) # 1-Singleusermode # 2-Multiuser, withoutNFS (Thesameas3, ifyoudonothavenetworking) # 3-Fullmultiusermode # 4-unused # 5-X11 # 6-reboot (DoNOTsetinitdefaulttotis) most of the desktop Linux systems the default runlevel is 5, the user login is a graphical interface, but most of the server version of the linux system the default runlevel is 3, the user login is character interface, in addition to debug 2 runlevel1 and rarely used outside, runlevels and S and not directly to users, but to prepare for Singleusermode. Linux run mode compared to windows startup mode has the advantage: you can use in system idle time .init tool switch you now use runlevel, also, when you shut down or start linux system you've unknowingly switch your runlevel, system shutdown process need to call the runlevel (0 or 6) to shut down all running processes. Displays the current operating mode just getting started, you may have previously and currently in use in running mode very curious, runlevel command can be used to display these information: $/sbin/runlevel35runlevel command output indicate that the initial run mode is 3, and now run mode is 5. Switch the operational mode switches operational mode using the telinit command (root): $/sbin/telinit usually run mode, switch to reset some of the application process, such as XFree86, will run from 5 to 3 terminates the XFree86 and the associated all processes, and then run the mode switch to 5, XFree86 can very clean start. In doing this work, please ensure that all work in XFree86 are saved, use the root user from: $/sbin/telinit3 $/sbin/telinit5 inAfter typing the command, your screen may show some service starts or stops. In the run mode to start the service to run in a mode to join a startup service, you first create the service startup script, and then put it in/etc/init.d/or/etc/rc.d/init.d (depending on your linux version), to set the startup script and run mode, you need the run mode to set up a directory and start the script/etc/rc.d/init.d/symboliclink, filename prefix usually SXX, XX is a number, this number is used to control the operation mode of the boot sequence. Script execution sequence is performed in ascending order according to the size of the numbers is a digital as small as possible to do, here's a during run mode to start the service specific examples: $ cpmyservice/etc/rc.d/init.d/$ ln-s/etc/rc.d/init.d/myservice/etc/rc3.d/S99myservice, next to runlevel3 starts, myservice will start automatically. To a runlevel starts you are able to develop the Access startup runlevel, if your system is using the lilo boot order in the appropriate sections as: LILO: linux5 if you are using GRUB, the boot time you can press the e key to enter setup mode, the appropriate location: kernel/vmlinuzroroot =/dev/hda15
No comments:
Post a Comment