Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference between boot sequence rc.local and chkconfig

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you the difference between boot sequence rc.local and chkconfig. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

The / etc/rc.local file has the following two lines

/ etc/init.d/mysql start

/ etc/init.d/keepalived start

/ etc/rc.local starts one in the order of the script and then starts the next. Start mysql first and then start keepalived

The chkconfig information is as follows

[root@localhost log] # chkconfig-- list | grep mysql

Mysql 0: on 1: on 2: on 3: on 4: on 5: on 6: on

[root@localhost log] # chkconfig-- list | grep keepalived

Keepalived 0: on 1: on 2: on 3: on 4: on 5: on 6: on

[root@localhost rc3.d] # ll | grep mysql

Lrwxrwxrwx 1 root root 15 Sep 14 08:36 S64mysql->.. / init.d/mysql

[root@localhost rc3.d] # ll | grep keep

Lrwxrwxrwx 1 root root 20 Sep 14 08:36 S21keepalived->.. / init.d/keepalived

Chkconfig depends on the running level.

For example, in the case of init 3, you can check / etc/rc3.d, which starts with S, that is, the number after start is the order. For example, if 21 is before 64, you need to start keepalived first.

The startup sequence is clear, and there is a little personal understanding.

Rc.local or chkconfig will not wait for the last service to start successfully before starting the next service, but will pass the instructions to one service in the startup order and then to the next service, regardless of how long it will take for the service to start successfully.

For example, it takes 5 minutes for A to start and 1 minute for B to start. In rc.local or chkconfig, the order of An is in front of B. it is true that A starts first and then B starts, but B may start first because B has a short time.

If this is not the case, the previous service will not start successfully, the later service will not start, and the operating system will not be so stupid.

The above is the boot sequence what is the difference between rc.local and chkconfig, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report