Per Einar Ellefsen wrote:
> It's a good idea. You're right, it makes navigation pretty good. The only
> thing that worries me is that it might take up too much space when applied
> to *all* the headers.

i agree :)

> Suggestion:
> - we only use that breadcrumb for some headers: we probably don't need them
> for Level 1 headers, but we could have them for atleast level 2, and maybe
> level 3 headers.
> - we add a horizontal rule before the level 1 header, as to separate
> sections visually.


i think the breadcrumb should be used everywhere or nowhere.
with everywhere i of course mean where there's one or more
"ancestor" links.

i have tried to apply your suggestion into the enclosed file.
i'm not so sure i like the rule across the page so many
times, but on the other i really dont have a better
soloution. well take a look again and see what you think.

another thing i tried and that i'm unsure of, can be seen if
you try to de-comment the comments at the top of the style
specs (in div.toc and span.tocheader). this should produce a
light gray box with a darkblue border around the toc-list.
it may be too boxy and anyway it's just an idea to further
seperate different parts of the page ... take a look.


./allan
Title: mod_perl Installation


mod_perl Installation

105 previous pageupnext page



Description

FIXME: DESCRIPTION



TOP



A Summary of a Basic mod_perl Installation

The following 10 commands summarize the execution steps required to build and install a basic mod_perl enabled Apache server on almost any standard flavor of Unix OS.


  % cd /usr/src
  % lwp-download http://www.apache.org/dist/httpd/apache_x.x.x.tar.gz
  % lwp-download http://perl.apache.org/dist/mod_perl-x.xx.tar.gz
  % tar xzvf apache_x.x.x.tar.gz
  % tar xzvf mod_perl-x.xx.tar.gz
  % cd mod_perl-x.xx
  % perl Makefile.PL APACHE_SRC=../apache_x.x.x/src \
    DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
  % make && make test && make install
  % cd ../apache_x.x.x
  % make install

Of course you should replace x.xx and x.x.x with the real version numbers of mod_perl and Apache.

All that's left is to add a few configuration lines to httpd.conf, the Apache configuration file, start the server and enjoy mod_perl.

If you have stumbled upon a problem at any of the above steps, don't despair, the next sections will explain in detail each and every step.

Of course there is a way of installing mod_perl in only a couple of minutes if you are using a Linux distribution that uses RPM packages:


  % rpm -i apache-xx.xx.rpm
  % rpm -i mod_perl-xx.xx.rpm

or apt system:


  % apt-get install libapache-mod-perl

These should set up both Apache and mod_perl correctly for your system. Using a packaged distribution can make installing and reinstalling a lot quicker and easier. (Note that the filenames will vary, and xx.xx will differ.)

Since mod_perl can be configured in many different ways (features can be enabled or disabled, directories can be modified, etc.) it's preferable to use a manual installation, as a prepackaged version might not suit your needs. Manual installation will allow you to make the fine tuning for the best performance as well.

In this chapter we will talk extensively about the prepackaged versions, and ways to prepare your own packages for reuse on many machines.



TOP



The Gory Details

We saw that the basic mod_perl installation is quite simple and takes about 10 commands. You can copy and paste them from these pages. The parameter EVERYTHING=1 selects a lot of options, but sometimes you will need different ones. You may need to pass only specific parameters, to bundle other components with mod_perl etc. You may want to build mod_perl as a loadable object instead of compiling it into Apache, so that it can be upgraded without rebuilding Apache itself.

To accomplish this you will need to understand various techniques for mod_perl configuration and building. You need to know what configuration parameters are available to you and when and how to use them.

As with Perl, with mod_perl simple things are simple. But when you need to accomplish more complicated tasks you may have to invest some time to gain a deeper understanding of the process. In this chapter I will take the following route. I'll start with a detailed explanation of the four stages of the mod_perl installation process, then continue with the different paths each installation might take according to your goal, followed by a few copy-and-paste real world installation scenarios. Towards the end of the chapter I will show you various approaches that make the installations easier, automating most of the steps. Finally I'll cover some of the general issues that can cause new users to stumble while installing mod_perl.

We can clearly separate the installation process into the following stages:

  • Source Configuration,
  • Building,
  • Testing and
  • Installation.


TOP

Source Configuration (perl Makefile.PL ...)

Before building and installing mod_perl you have to configure it. You configure mod_perl just like any other Perl module:


  % perl Makefile.PL [parameters]

In this section we will go through most of the parameters mod_perl can accept and explain each one of them.

First let's see what configuration mechanisms we have available. Basically they all define a special set of parameters to be passed to perl Makefile.PL. Depending on the chosen configuration, the final product might be a stand-alone httpd binary or a loadable object.

The source configuration mechanism in Apache 1.3 provides four major features (which of course are available to mod_perl):

  • Per-module configuration scripts (ConfigStart/End)

    This is a mechanism modules can use to link themselves into the configuration process. It is useful for automatically adjusting the configuration and build parameters from the modules sources. It is triggered by ConfigStart/ConfigEnd sections inside modulename.module files (e.g. libperl.module).

  • Apache Autoconf-style Interface (APACI)

    This is the new top-level configure script from Apache 1.3 which provides a GNU Autoconf-style interface. It is useful for configuring the source tree without manually editing any src/Configuration files. Any parameterization can be done via command line options to the configure script. Internally this is just a nifty wrapper to the old src/Configure script.

    Since Apache 1.3 this is the way to install mod_perl as cleanly as possible. Currently this is a pure Unix-based solution because at present the complete Apache 1.3 source configuration mechanism is only available under Unix. It doesn't work on the Win32 platform for example.

  • Dynamic Shared Object (DSO) support

    Besides Windows NT support this is one of most interesting features in Apache 1.3. Its a way to build Apache modules as so-called dynamic shared objects (usually named modulename.so) which can be loaded via the LoadModule directive in Apache's httpd.conf file. The benefit is that the modules are part of the httpd executable only on demand, i.e. only when the user wants a module it is loaded into the address space of the httpd executable. This is interesting for instance in relation to memory consumption and upgrading.

    The DSO mechanism is provided by Apache's mod_so module which needs to be compiled into the httpd binary. This is done automatically when DSO is enabled for module mod_foo via:


      ./configure --enable-module=foo

    or by explicitly adding mod_so via:


      ./configure --enable-module=so
  • APache eXtenSion (APXS) support tool

    This is a new support tool from Apache 1.3 which can be used to build an Apache module as a DSO even outside the Apache source-tree. One can say APXS is for Apache what MakeMaker and XS are for Perl. It knows the platform dependent build parameters for making DSO files and provides an easy way to run the build commands with them.

    (MakeMaker allows an easy automatic configuration, build, testing and installation of the Perl modules, and XS allows to call functions implemented in C/C++ from Perl code.)

Taking these four features together provides a way to integrate mod_perl into Apache in a very clean and smooth way. No patching of the Apache source tree is needed in the standard situation and in the APXS situation not even the Apache source tree is needed.

To benefit from the above features a new hybrid build environment was created for the Apache side of mod_perl. The Apache-side consists of the mod_perl C source files which have to be compiled into the httpd program. They are usually copied to the subdirectory src/modules/perl/ in the Apache source tree. To integrate this subtree into the Apache build process a lot of adjustments were done by mod_perl's Makefile.PL in the past. And additionally the Makefile.PL controlled the Apache build process.

This approach is problematic in several ways. It is very restrictive and not very clean because it assumes that mod_perl is the only third-party module which has to be integrated into Apache.

The new approach described below avoids these problems. It prepares only the src/modules/perl/ subtree inside the Apache source tree without adjusting or editing anything else. This way, no conflicts can occur. Instead, mod_perl is activated later (when the Apache source tree is configured, via APACI calls) and then it configures itself.

We will return to each of the above configuration mechanisms when describing different installation passes, once the overview of the four building steps is completed.



TOP

Configuration parameters

The command perl Makefile.PL, which is also known as a "configuration stage", accepts various parameters. In this section we will learn what they are, and when should they be used.



TOP

APACHE_SRC

If you specify neither the DO_HTTPD nor the NO_HTTPD parameters you will be asked the following question during the configuration stage:

etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.


Use of the Camel for Perl is a trademark of O'Reilly & Associates, and is used by permission.

Last modified Mon Apr 1 16:57:57 2002


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to