sysvconfig, or how I learned to love run levels

Well, maybe love isn’t quite the right word. More like deal, as learning to deal with run levels.

When I moved over from Redhat to Debian I really missed chkconfig, a wonderful helper script that obviated the need to manually mess around with the symbolic links in the /etc/rc.* family tree.   Ah, but sysvconfig to the rescue.

As an example, while I have Apache installed on my laptop I prefer to run this service selectively on an as needed basis. I mean, I don’t necessary want to make a web server available on my laptop when sipping coffee at my local wifi spot.  While there are other options, like update-rc.d, sysvconfig is, IMHO, the easiest and most intuitive method to enable/disable local services.

svsvconfig is available in the Ubuntu repositories and installable via 'sudo apt-get install svsvconfig'. To use this oh so useful utility 'sudo svsvconfig' and you’ll be presented with four choices:

  1. “Enable/Disable” (to edit which service to either start (enable) or stop (disable) when the system boots)
  2. “Edit” (edits the run levels in which a selected service starts or stops)
  3. “Restore”
  4. “Quit”

Since I wanted to stop Apache from automatically starting in all run levels when the laptop booted, I selected “Enable/Disable”, arrowed down to the apache2 entry and pressed the space bar as a toggle ( [  ] means the service is disabled, [ * ] means that the service is enabled), then tabbed to ‘OK’.  To exit, I arrowed down to “Quit”.

Done. That’s all that was is necessary.

Quick note, navigation is accomplished with the arrow keys, tab, and enter. This is not a mouseable gui, just a pretty script. Happy sysadmining.

This entry was posted by on Monday, December 15th, 2008 at 9:37 pm and is filed under Sharing What Have I Learned, System Administration. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

2 comments

 No.1 
Elena:

I just found your blog, and I’m super stoked! Please keep actively posting helpful tips like the one above!
Cheers,
Elena :)
Boulder, CO

December 19th, 2008 at 12:51 pm
 No.2 

Glad you found it useful, Elena! A side benefit to installing the sysvconfig script is that ‘service’, a script that start/stops services without having to use the explicit path to the /etc/init.d/* can also be used.

Using the example of starting (or stoping) apache2 use sudo service apache2 start (or stop).

Admittedly, it’s not that much of a difference from sudo /etc/init.d/apache2 start/stop/restart, but it gives me pleasure.

December 19th, 2008 at 9:54 pm

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment