Wednesday, August 09, 2006

How to Install mod_python on Linux Box

What is mod_python?

Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals. You can get mod_python from www.modpython.org.

(1) Create configuration file and check dependency with this command

./configure --with-apxs=/data/opt/apache/bin/apxs

(2) Then continue with make command

make

(3) To install mod_python you need a root privileges

su

(4) Install mod_python

make install

For a note, if there is a trouble with -DEAPI, then add to Makefile after configuring : EXTRA_CFLAGS = -DEAPI

No comments: