Installation

NOTE: By far the best place to get help with installation and other issues is the mod_python mailing list. Please take a moment to join the mod_python mailing list by sending an e-mail with the word "subscribe" in the subject to mod_python-request@modpython.org.

For installation on Windows, click here.

The installation involves the following steps:

1. Prerequisites

You will need to have the include files for both Apache and Python, as well as the Python library installed on your system. If you installed Python and Apache from source, then you have nothing to worry about. However, if you are using prepackaged software (e.g. Linux Red Hat RPM, Debian, or Solaris packages from sunsite, etc) then chances are, you just have the binaries and not the sources on your system. Often, the include files and the libraries are part of separate "development" package. If you are not sure whether you have all the necessary files, either compile and install Python and Apache from source, or refer to the documentation for your system on how to get the development packages.

2. Compiling

There are two ways that this module can be compiled and linked to Apache - statically, or as a DSO (Dynamic Shared Object).

Static linking is a more "traditional" approach, and most programmers prefer it for its simplicity. The drawback is that it entails recompiling Apache, which some people cannot do for a variety of reasons. For example in a shared web hosting environment the Apache binary might not be writable by the user.

Dynamic Shared Object (DSO) is a newer and still somewhat experimental approach. The module gets compiled as a library that is dynamically loaded by the server at run time. A more detailed description of the Apache DSO mechanism is available here.

The advantage is that a module can be installed without recompiling Apache and used as needed. DSO has its disadvantages, however. Compiling a module like mod_python into a DSO can be a complicated process because Python, depending on configuration, may rely on a number of other libraries, and you need to make sure that the DSO is statically linked against each of them. Luckely, the configure script below will solve this headache for you by automatically figuring out all the necessary parameters.

Run ./configure

The ./configure script will analyze your environment and create custom Makefiles particular to your system. Aside from all the standard autoconf stuff, ./configure does the following:

Run make

3. Installing

4. Configuring Apache

5. Testing

If everything worked well, move on to the tutorial.

6. Troubleshooting

There are a couple things you can try to identify the problem:

Last modified: Wed Oct 18 12:07:07 EDT 2000