Startup order of services on RHEL or CentOS

The startup order of services on Red Hat Enterprise Linux (and very likely other flavours) is determined by the numerical prefix on the symbolic links in /etc/rc3.d/ (for run level 3), /etc/rc5.d/ (for run level 5), and so on.

When adding a service (chkconfig –add my_service –level 35), you can specify startup order by including a chkconfig clause in the header:

# chkconfig: 35 59 80

The above service should start at run level 3 and 5 as the 59th service to run (the numbering is sparse, so there isn’t necessarily as a 58th service).

The 80 specifies the shut down order.

Obviously, do not rename the symbolic links yourself. Use chkconfig to manage them.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.