
BUILD:

1) Build Berkeleydb
********************
upload berkeleydb db-4.8.30 to a directory,say 'sw', and uncompress sources:
>> cd sw/db-4.8.30
>> mkdir build_unix
>> cd build_unix

Choose directories where you will install include files, library and executable
We suppose here you choosed /usr/include /usr/lib and /usr/bin respectively.

>> ../dist/configure --enable-smallbuild --disable-shared --libdir=/usr/lib --includedir=/usr/include --bindir=/usr/bin
>> make
>> sudo make install


This will install the following files:

/usr/include/db.h and db_cxx.h
/usr/lib/libdb.a and libdb-4.8.a
/usr/bin/db_* (11 files)

Comment: With these files, we can compile a C program with the command: >> gcc program_to_compile -ldb-4.8 -lpthread

2) Build Postgres
*****************
see the postgres manual.
install the sources to sw/postgresql-8.4.5

the short version is:
	cd sw/postgresql-8.4.5
	./configure
	µµµµµµµµµµµµµµµµµµµµµµµµ
	gmake
	su
	gmake install
	adduser postgres
	mkdir /usr/local/pgsql/data
	chown postgres /usr/local/pgsql/data
	su - postgres
	/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
	/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
	exit
	/usr/local/pgsql/bin/createdb test
	/usr/local/pgsql/bin/psql test

add to your PATH /usr/local/pgsql/bin

in the directory src/contrib of postgres sources, uncompress openbarter and move it to src/contrib,
>> mv openbarter sw/postgresql-8.4.5/src/contrib
>> cd sw/postgresql-8.4.5/src/contrib/openbarter
>> make
>> make install

3) Create database and users
****************************
>> createdb mp
>> psql -Dmp < sw/postgresql-8.4.5/src/contrib/openbarter/model.sql
>> createuser market

3) Install the model
********************
for a database called mp
>> cd src/contrib/openbarter
>> psql -dmp < modele.sql







