Re: Teaching standard init config...
"Kronocide" <henning@kronocide.com> wrote in message
news:1133011765.417731.186440@g49g2000cwa.googlegr oups.com...
> I'm having a problem. I'm planning for a college course in Apache web
> server, and have opted to teach the standard way of compiling and
> installing the software from source. The problem is to configure the
> machine to start Apache at boot.
>
> It seems one of the rules of creating your own Linux dist is to make
> sure your init config doesn't look like anyone else's. It's not just a
> matter of a layer of config tools on top of the standard files, etc.
> The hierarchy of scripts is really different from Red Hat to Slackware
> to Ubuntu.
>
> So I'm at a loss. If I can't teach how to make Apache start at boot, I
> can't really teach them how to compile and install from source. Since
> the students choose whatever dist they like, I can't really teach
> installing Apache at all. To me, that is an essential part of the
> course.
Reverse engineer it. Do what the rest of us do when packaging tools, and
look how the experts do it. For Apache, I'd take apart an SRPM and build an
RPM from it for RedHat or SuSE, look at a deb if we were teaching in Debian
or Ubunto, etc. If I didn't have or want an RPM, I'd teach the students to
look at the existing examples, such as the network init script, and show how
it has start/stop/chkconfig/restart/status options, how it uses chkconfig to
manage enabling and restarting it, etc.
> I'm basically just looking for some feedback on this. Have you been
> taught some standard way of dealing with rc scripts? Any great ideas in
> general?
I've written plenty: I look at what the locally supported distro does, and
teach *that* as a guiding principle, to teach people to avoid setting things
up from scratch that may conflict with local setups.
You get good results from this: by discussing with them why, say, RedHat
puts the actual web pages in /var/www and how /var is set aside for bulky
material that changes rapidly, and why /etc/httpd is a good directory to put
the dozens of config files of a complex setup and avoid mingling them with
other things in /etc., or why if installing from scratch starting out by
putting things in /usr/local instead of /usr can help avoid stomping local
system files, you can milk the lesson for a lot of very useful programming
principles that will save your students pain in future lives. |