Adding A Custom Built Apache Installation to chkconfig

In: Linux| Scripts| Software

15 Jul 2009

There’s lots of reasons to steer away from a nicely packaged version of apache. Most recently I needed to do this for a custom build of curl and cAres, but whatever your reason, you’ll find yourself with an apachectrl that’s not quite ready to be used with chkconfig.

The fix is really simple, chkconfig wants to see 2 lines in your apachectrl that tell it what it is and what to do with it. At that point, chkconfig will recognize the service as your script name. So here it is:

  1. Add the following lines to the top of the apachectrl script that you’ll find in the apache2/bin directory of your install.#!/bin/sh
    #
    # chkconfig: 35 85 15
    # description: Apache is a World Wide Web server.

    #
    # Licensed to the Apache Software Foundation (ASF) under one or more

    The first line:
    # chkconfig: 35 85 15
    The 35 tells chkconfig you want the service running at run level 3 and run level 5.
    The 85 is the start priority.
    The 15 is the stop priority.

    The second line:
    # description: Apache is a World Wide Web server.
    This is merely a description of the service.
    *note* Both lines start with a comment “#” (pound sign).

  2. Once your lines are in place you can move or link your apachectrl to /etc/init.d/httpd
  3. Once the script is in /etc/init.d/ you can run the following command to make it all go:
    chkconfig httpd on(this is of course assuming that you named the script in /etc/init.d/ “httpd”, if you named the script “chuck” then you’ll run: chkconfig chuck on, I think you get the point).

That is all.

Share and Enjoy:

  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • Netvibes
  • Reddit
  • Slashdot
  • SphereIt
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

Related Posts:

  • No Related Posts

1 Response to Adding A Custom Built Apache Installation to chkconfig

Avatar

zkfabqp

February 22nd, 2010 at 7:00 pm

ukzQkJ qaleealvzpma, [url=http://bdwntfifheie.com/]bdwntfifheie[/url], [link=http://hmnlihypbxof.com/]hmnlihypbxof[/link], http://wznskgqbwayh.com/

Comment Form

Recent Posts

  • longchamp: nordstrom http://jmultipleir-djjq.04FORDPARTS.US/tag/nordstrom+longchamp+purses/ : purses.. [...]
  • r2: r2 http://eavedaspaxf.AUTOPARTSVILLE.INFO/tag/r2+Sap+Aveda/ : Sap... Aveda... [...]
  • price: Microwave http://aemersonw0mq76.BEDROOMPROPERTY.INFO/tag/price+Emerson+Microwave/ : Emerson [...]
  • projection: projection http://aprojectionvbt-i0.03GMCPARTS.US/tag/projector+projection+TV/ : projector. [...]
  • Perfume: Perfume http://dnurserywclsbf.bestpartsstore.info/tag/pictures+Perfume+givenchy/ : Perfume. [...]