Web Server Setup for Linux
Introduction
------------
We are unsing centos.
The following must be installed for everything to work properly.
It is important that at every step you specify the right versions.
Since you may have 2 version of python, its very easy to get a python component wrong.
Not that this ever happened to me.
For example, when installing mod_wsgi, if you do not explicitly specify the
right version, the default version will be used. This may cause problems
that are difficult to trouble shoot.
System Administration Essentials
--------------------------------
You will need a moderate amount of unix foo (fu) to do this.
If you are a real unix sys-admin, skip this section.
At many points through out this installation, you may see something to this effect:
Libraries have been installed in:
/usr/lib64/httpd/modules
(...and some additional text)
When you do, you must add the directory to the dynamic linker run-time bindings.
Generally, building software from source follows the following pattern.
Create and cd to a consistent location where you do your builds.
In real life, there are usually variations to the above pattern,
sometimes significant variations.
Preliminaries
-------------
Install development packages for apache httpd
PYTHON2.5
---------http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
Compile and install 2.5.4 along side what ever python version is already installed.
Using "altinstall" allows mutliple versions to be installed.
When using "altinstall" note that you must type "python2.5" and not "python" to get
the right version. Enable 4 byte unicode so it plays nice with psycopg2.
Build
Test
Linkshttp://effbot.org/pyfaq/when-importing-module-x-why-do-i-get-undefined-symbol-pyunicodeucs2.htmhttp://www.fishandcross.com/blog/?p=610
MOD_WSGI
--------http://modwsgi.googlecode.com/files/mod_wsgi-2.5.tar.gz
This is the software that allows python to run on httpd.
It is supposed to a fast, solid, production python "application server".
Make sure you install the apache httpd dev libs first.
Be very sure that you tell configure to use the right version of python...
not that this caused me any trouble.
Linkshttp://code.google.com/p/modwsgi/
PSYCOPG2
--------http://initd.org/psycopg/tarballs/PSYCOPG-2-0/psycopg2-2.0.12.tar.gz
This is the python database driver for postgresql.
First you must install some postgres development packages.
Inside the psycopg2 package, you'll need to find and edit setup.cfg
so that its knows the location of pg_config.
Run the install.
linkshttp://initd.org/
GEOS
http://download.osgeo.org/geos/geos-3.1.1.tar.bz2
preliminary
install
linkshttp://geodjango.org/docs/install.html
PROJ.4
------
A bit unusual; follow these instructions:
http://geodjango.org/docs/install.html#proj4
linkshttp://geodjango.org/docs/install.html
GDAL
http://download.osgeo.org/gdal/gdal-1.6.2.tar.gz
Without GDAL, geodjango wfs does not work.
We build without the gdal python bindings because geodjango has its own.
The install is bog standard; make takes a good while.
DJANGO
------
Since this is pure python, you can copy this into the python site-packages.
Or install as you see fit.