Here is a how to for the installation of the Postgresql DB on a Debian Wheezy (Stable at the time of writing). We’re gonna describe the installation With Postgresql 9.1. As Darwin is tested with PG9.1 it may be working with newer version as well.
Install the required packages :
# sudo aptitude install git postgresql-9.1 postgresql-contrib-9.1 postgresql-9.1-postgis
Quick, Dirty and Unsafe config of PG (where main is the name of your cluster)
in /etc/postgresql/9.1/main/postgresql.conf
listen_addresses = '*'
custom_variable_classes = 'darwin'
datestyle = 'iso, dmy'
you might want to display everything in your logs by adding : log_min_duration_statement = 0
in /etc/postgresql/9.1/main/pg_hba.conf
host all all 0.0.0.0 0.0.0.0 md5
Don’t forget to restart with your cluster ( sudo /etc/init.d/postgresql restart )
Darwin Db install scripts are located in the main darwin repository (where the web interface is ). If you already have a copy of the code, go in it, if not, just do :
$ git clone https://github.com/naturalsciences/Darwin.git darwin
then go to the darwin/data/db/
directory
First of all contributive packages are used in Darwin such as pg_trgm and pgcrypto
We provide a script for the installation of darwin
use the command install.sh help to view more details about the script.
For some commands you must be connected to the database with the postgres user account, so make sure you have access to the postgres user through sudo
We STRONGLY recommend you to put a ~/.pgpass
file in your home and in the postgres home
directory to avoid typing your password over and over again (especially
for testing).
Read the Documentation about .pgpass
Add a .pgpass
and make it look (please adapt it for your needs) like this :
127.0.0.1:*:*:darwin2:MyP4ssw0rd!
Don’t forget to chmod it correctly
$ chmod u=rw ~/.pgpass
The easiest way to install the db is to call the command :
$ ./install.sh install-all
This command will create a new db with a new tablespace and install all of darwin in it.
You can also customize the installation by passing some variable to the script (see ./install.sh help)