FPS Third-Party Software Installation

Infrastructure

Server hardware requirements
Linux or Mac OS X machine running PostgreSQL 8.0.x (minimum)

Server Software
These are the packages needed for an application that runs as a server. This typically means the application is running as a service on some host.
The software must be built in this order.

Python 2.5 (minimum) - the Python programming language and environment
Postrgres 8.1.x (minimum) - the Postgres relational database
psycopg2 - the Python/Postgres database interface
For Mac OSX Installs you will also need:
XCode Tools
http://developer.apple.com/tools/xcode/

Client Software
These are the packages needed for an application that runs as a client. This typically means the application does not need to directly access the database.
The software must be built in this order.

Python 2.5 (minimum) - the Python programming language and environment
Qt 4.2.3 - the Qt application toolkit by Trolltech
PyQt 4.2.x - the Python interface to Qt
For Mac OSX Installs you will also need:
XCode Tools
http://developer.apple.com/tools/xcode/


General install instructions
Packages can be uncompressed using bunzip2.

Installing Postrgres

Files

$MTG_ROOT/mtg_pub/trunk/zzz/common/postgresql-8.1.3.tar.bz2 $MTG_ROOT/mtg_pub/trunk/zzz/common/postgresql-base-8.1.3.tar.bz2 $MTG_ROOT/mtg_pub/trunk/zzz/common/postgresql-docs-8.1.3.tar.bz2 $MTG_ROOT/mtg_pub/trunk/zzz/common/postgresql-opt-8.1.3.tar.bz2 $MTG_ROOT/mtg_pub/trunk/zzz/common/postgresql-test-8.1.3.tar.bz2



Needed environment variables

setenv PGDATA /usr/local/pgsql/data (or where is appropriate for your db installation)



Install location

/usr/local/pgsql



Install instructions

./configure


make


sudo make install


Database setup instructions

Become the 'postgres' user su - postgres


/usr/local/pgsql/bin/initdb



Add the following lines to the $PGDATA/pg_hba.conf

# TYPE DATABASE USER CIDR-ADDRESS METHOD
host all DBA_USERNAME IP_ADDRESS md5
host all pdm IP_ADDRESS md5



where DBA_USERNAME is the username of the person (or persons) who manage the database. 'pdm' is the Persistent Data Manager (PDM) user. The CIDR addresses above will need to be changed (most likely, unless you are running a NAT that uses 192.168.0.X as the IP space).

Edit the $PGDATA/postgresql.conf file to change the default listen_address
listen_address = '*'

Start postgres

/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/log/pgstartup.log start



/usr/local/pgsql/bin/createuser --pwprompt --superuser DBA_USERNAME


This role should be created as a superuser. You can provide additional options to assign the user a password. See the createuser help message for more information.

Installing psycopg2

Files

$MTG_ROOT/mtg_pub/trunk/zzz/common/psycopg2-latest.tar.bz2



Install location

/usr/local/lib/python2.5



Install instructions

/usr/local/bin/python setup.py build


sudo /usr/local/bin/python setup.py install


MacOSX-specific install instructions

These are directions on how to install the tools for Mac OS X. It is assumed the to be Tiger or later.

You will need to have /usr/local/bin on your path such that python is pulled from that location. Otherwise, whenever you invoke python, you will need to run it explicitly as
/usr/local/bin/python.

Installing XCode Tools

Download and install Xcode tools. This provides tools including gcc.

http://developer.apple.com/tools/xcode/



Installing Python

Python is a bit weird on MacOSX because of OSX frameworks. A standand build and install to /usr/local won't work. The extensions won't build correctly (the newly built extensions end up using the OS install of Python no matter what you do).

To avoid the problem, you need to build Python with the framework stuff enabled.

Files

$MTG_ROOT/mtg_pub/trunk/zzz/common/python-2.5.tar.bz2



Build Location

/usr/local/src



Install location

/usr/local


Install instructions

configure --enable-framework


make


sudo make frameworkinstall



Some additional cleanup
The install misses a couple things that probably aren't critical, but I put in place because they would be expected.

If you have a python2.4 directory /usr/local/lib, then you've installed Python in /usr/local before. Move that directory aside. After doing a framework install it won't be used.

cd /usr/local/lib


mv python2.5/ python2.5.to_be_removed


ln -s ../../../Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 .



For completion however, I do put a symlink to the python2.4 directory. This is where I would expect to find it if I was looking for the core modules. The same applies to the include directory.

cd /usr/local/include


mv python2.5/ python2.5.to_be_removed


ln -s ../../../Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 .



Installing Qt 4.2.3

Files

$MTG_ROOT/mtg_pub/trunk/zzz/macosx/qt-mac-opensource-src-4.2.3.tar.bz2



Needed environment variables

Set PATH environment to contain bin directory where Qt tools will be installed (typically /usr/local/Trolltech/Qt-4.2.3/bin)



Install location

/usr/local/Trolltech/Qt-4.2.3



Install instructions

./configure


make


sudo make install



Installing PyQt 4.x

Files

$MTG_ROOT/mtg_pub/trunk/zzz/macosx/pyqt-mac-gpl-4.2.tar.bz2


$MTG_ROOT/mtg_pub/trunk/zzz/common/sip-4.5.tar.gz



Install location

/usr/local



Install instructions
First build sip

/usr/local/bin/python configure.py


make


sudo make install



Finally build PyQt

/usr/local/bin/python configure.py


make


sudo make install



Linux Specific Install instructions
These are directions on how to install the tools for Linux.

Installing Python

Files

$MTG_ROOT/mtg_pub/trunk/zzz/common/python-2.5.x.tar.bz2



Install location

/usr/local



Install instructions

configure


make


sudo make install




Installing Qt 4.2.3

Files

$MTG_ROOT/mtg_pub/trunk/zzz/linux/qt-x11-opensource-src-4.2.3.tar.bz2



Needed environment variables

Set PATH environment to contain bin directory where Qt tools will be installed (typically /usr/local/Trolltech/Qt-4.2.3/bin)



Install location

/usr/local/Trolltech/Qt-4.2.3



Install instructions

./configure


make


sudo make install




Installing PyQt 4.x

Files

$MTG_ROOT/mtg_pub/trunk/zzz/linux/pyqt-x11-gpl-4.2.tar.bz2


$MTG_ROOT/mtg_pub/trunk/zzz/common/sip-4.5.tar.gz



Install location

/usr/local



Install instructions
First build sip

/usr/local/bin/python configure.py


make


sudo make install



Finally build PyQt

/usr/local/bin/python configure.py


make


sudo make install