Software in need:

This boils down to the following package list on Debian systems: python2.3-4suite, python2.3-psycopg, postgresql and their dependencies, of course.

Unpack the source. You have basically four parts there. The daemon dispatching the hard work, some python modules, the application and a script preparing the data base with the needed data structures.

Place the modules directory somewhere you like. Dont change the simple structure. The general "import" function of python looks of course only in the system standard directories. While you could get the python interpreter to look additionally in another paths, too (PYTHON_PATH environment variable), it's hard coded in the script. - I chose this way, because the suexec of Apache does not generally permit passing of environment variables. So, change the script to set the module path according to where you put the files.

Change further in the application script the base directory holding you fotos. This is basically a directory tree containing JPEGs.

Compile the daemon. In the daemon directory do:
gcc -o gdomain gdomain2-unix.c -lpthread

Finally get the Webserver to execute the application script and you are done!

See "Operation" for further instructions.