My favorites | Sign in
Project Logo
                
Search
for
Updated Dec 10, 2009 by Graham.Dumpleton
Labels: Phase-Deploy
InstallationOnLinux  
Installation of mod_wsgi on Linux.

Installation On Linux

If using a Linux system, mod_wsgi can be installed direct from source code.

For descriptions of problems that may be encountered during installation on Linux, see the general documentation on "Installation Issues".

If however you prefer to use packages specific to your Linux distribution, details of known packages are listed given below.

Debian Packages

Details on Debian packages can be found at:

http://packages.debian.org/unstable/python/libapache2-mod-wsgi

Thanks to Bernd Zeimetz for preparing and putting together this distribution.

Fedora Packages

Prior location provided for Fedora packages no longer works. The URL was:

http://download.fedora.redhat.com/pub/epel/5/i386/repoview/mod_wsgi.html

Note that the official Fedora packages are hopelessly out of date and are actually for a version of mod_wsgi which isn't recommended be used anymore.

For a more extensive set of up to date, but unofficial, binary packages for Fedora and Redhat systems, see:

http://codepoint.net/attachments/mod_wsgi/

These use whatever is the default Python version on the respective systems.

Arch Linux Packages

Details on Arch Linux packages can be found at:

http://aur.archlinux.org/packages.php?ID=13394

Thanks to Nicolas Steinmetz for preparing and putting together this distribution.

SUSE Linux Packages

Details on SUSE Linux packages can be found at:

http://software.opensuse.org/search?q=mod_wsgi

Thanks to Peter Poeml for preparing and putting together this distribution.

Restarting Apache Service

When using a prepackaged Apache on a Linux system, they will have generally integrated starting and stopping of Apache into the operating system service management features. When this is the case, the 'apachectl' script may not work as originally intended by the Apache authors and it is instead necessary to always use the operating system specific mechanism to start, stop or restart Apache.

An example of an error which may occur when trying to restart Apache using 'apachectl' on such a system is:

httpd (pid 22361?) not running
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Because the exact mechanism used to manage services can differ between Linux operating system variants, you should consult the documentation for the prepackage version of Apache, or that for the operating system itself.

One approach used requires that the 'init.d' script be used directly.

/etc/init.d/apache2 stop
/etc/init.d/apache2 start

Another is to use an intermediary management script, which in turns executes the appropriate 'init.d' script:

invoke-rc.d apache2 reload
Hosted by Google Code