In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the example analysis of Linux startup script, which is very detailed and has certain reference value. Friends who are interested must finish it!
The startup method and execution order of redhat are:
Load kernel
Execute the init program
/ etc/rc.d/rc.sysinit # * scripts executed by init
/ etc/rc.d/rc $RUNLEVEL # $RUNLEVEL is the default operation mode
/ etc/rc.d/rc.local # after the corresponding level of service is started, the file is executed (in fact, you can also write the commands you need to execute to the file)
/ sbin/mingetty # waiting for users to log in
In Redhat, / etc/rc.d/rc.sysinit mainly does the same initialization work in each running mode, including:
Call in keymap and system fonts
Start swapping
Set hostname
Set the NIS domain name
Check (fsck) and mount the file system
Open the quota load sound card module to set the system clock and so on.
/ etc/rc.d/rc executes scripts in the corresponding directory according to the run mode specified by its parameters (run level, which you can set in the inittab file). Anything that starts with Kxx is called with stop as a parameter; anything that starts with Sxx is called with start as an argument. The order of the invocation is xx from small to large. (where xx is a number and represents the startup order.) for example, assuming that the default run mode is 3 _ etc/rc.d/rc3.d/ _ RC will invoke the script under / _ above.
It is worth mentioning that the operation modes 2, 3, and 5 in Redhat all use / etc/rc.d/rc.local as one of the initialization scripts, so users can add some commands to this file that need to be executed before logging in after other initialization work.
After init waits for / etc/rc.d/rc execution (because the action of / etc/rc.d/rc in / etc/inittab is wait), it runs / sbin/mingetty on each specified virtual terminal, waiting for the user to log in. At this point, the startup of Linux is over.
The above is all the contents of the article "sample Analysis of Linux Startup script". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.