[mod_python] Install mod_python without being root?

Deron Meranda deron.meranda at gmail.com
Tue Feb 7 14:18:40 EST 2006


On 2/7/06, Fleming, Brian J. <Brian.Fleming at tellabs.com> wrote:
> I've succssfully compiled mod_python, but my unix admins are reluctant
> to have it install anything into the official location of Python yet.
>
> Is there a way to install the required libs or whatever binaries are
> needed for mod_python to an alternate location?  Or, at least be able to
> identify what make install is doing?

This is a good question.  Here are some of my thoughts to get you
started.  But if anyone knows how to do this for sure, this could be
worth writing up in some FAQ.

There are actually two install issues.  Installing the Python parts
(all the *.py files), and installing the Apache parts (the
mod_python.so DSO module).  Both may require root/admin permissions
normally.

You can easy install the python stuff to any other directory, and
adjust your python path to look there when importing them.

The Apache module loading though can be much more complicated (the
difficulty level is somewhat dependent upon the platform you're
compiling under).

You may need to drive the "make install" phase manually to get it to
install your module in a non-standard location.  Look at the APXS
documentation, http://httpd.apache.org/docs/2.0/programs/apxs.html

And then you'll need to supply absolute paths to your LoadModule or
LoadFile directives.

Also, it should go without saying.  If you install as non-root into
non-standard locations, you'll need to run your own instance of the
httpd process with your own custom httpd.conf.  This also means you're
going to be restricted to using non-reserved ports (not on port 80).

Note I've not actually tried this; I'd be interested to hear from people who do.
--
Deron Meranda



More information about the Mod_python mailing list