Saturday, January 29, 2011

How to change Linux services startup/boot order?

Hi,

As the question is clear from the title, how do I change Linux services startup/boot order?

  • No offence, but the answer is the first hit on Google for "Linux Service Boot Order"

    wolfgangsz : Well, it is a rather trivial question. I am surprised the OP didn't make the effort to google it first him/herself.
  • You want to read a little about your runlevels and rc.d directories. Inside the rc.d directories you can find the S and K links, like S20apache K10apache, that is basically what orders startup/shutdown of scripts.

    There are some changes being made on this architecture but most of the linuxes are still using it.

    Chris S : I'm amazed most distros still use this system; better systems like `rcorder` have been around for a while.
    coredump : I kinda envy solaris `svc`, but could do without the xml stuff
    Redmumba : This is spot on. Depending on your distro, however, you may have different ways of altering this value--so read up on the specific documentation for your distro.
    Dennis Williamson : Some distributions, such as Ubuntu, use [Upstart](http://upstart.ubuntu.com/) ( [Wikipedia](http://en.wikipedia.org/wiki/Upstart) ).
    From coredump
  • You can change the order by renaming the symlinks under /etc/rcX.d/ where x will be your run level.

    You'll see a bunch of files starting with Sxx or Kxx. S links are traced during startup while the K ones are parsed for shutdown. The xx here represents the order.

    But this order is set for a reason, so be careful while changing them.for example. ntpd should start only after the networking subsystem is initialized.

    From rags

0 comments:

Post a Comment