For ubuntu linux, see https://help.ubuntu.com/community/PostgreSQL

# get a known password on the postgres user in postgresql
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres'"

# Make a user for local sosigwlog (Answer sosigwlog, sosigwlog, postgres)
sudo -u postgres createuser -U postgres -W -P -S -D -R sosigwlog

# On global database only, make a user for global sosigwgloballog (Answer sosigwgloballog, sosigwgloballog, postgres)
sudo -u postgres createuser -U postgres -W -P -S -D -R sosigwgloballog

# copy postgres JDBC driver to tomcat installation 
cp sosigw.war/WEB-INF/lib/postgresql-postgresql.jar ~/apache-tomcat-5.5.23/common/lib/ 

SQL's for the two sets are in one file each:
-local: etc/sql/create-local-db.sql
-global: etc/sql/create-global-db.sql

#The above commandlines, as SQL instead. Preparing to allow db-creation completely from scripting...
# to run them, get sufficient role, e.g.

sudo -u postgres psql 

CREATE ROLE sosigwlog LOGIN
  PASSWORD 'sosigwlog'
  NOSUPERUSER INHERIT CREATEDB NOCREATEROLE;

CREATE DATABASE sosigwlog WITH OWNER = sosigwlog ENCODING = 'UTF8';

#Global db:

CREATE ROLE sosigwgloballog LOGIN
  PASSWORD 'sosigwgloballog'
  NOSUPERUSER INHERIT CREATEDB NOCREATEROLE;

CREATE DATABASE sosigwgloballog WITH OWNER = sosigwgloballog ENCODING = 'UTF8';

  