Note: This file is not yet updated for OGo 1.0a!

You have to patch your pg_hba.conf to allow tcp host connections. What we want is a setup that will trust connections from the localhost, but deny from other hosts. The following will accomplish this.

# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all 0.0.0.0 255.255.255.255 reject

Some people have had problems with this. You may need to put the following in instead. I'm not sure why at this stage; I think perhaps the file format for woody and sid are different. If you're running woody, try the following:

local all trust
host all 127.0.0.1 255.255.255.0 trust
host all 0.0.0.0 255.255.255.255 reject

You also have to make sure that you allow TCP/IP socket connections. You do this in your /etc/postgresql/postgresql.conf file with the line:
tcpip_socket = true

Then restart postgres with /etc/init.d/postgresql restart . You can see if postgres is allowing connections by looking in /var/log/syslog.

If you want get more security replace trust by password, md5 or something... depends on postgres version. Don't forget to restart postgres after modifying these settings. TODO: update this bit

Now we can create the database, user and import tables:

su - postgres
createdb ogo
createuser -a -d ogo
psql ogo ogo #if you have problems with this, try psql -U ogo ogo
# [now you are on the postgresql prompt]
ogo=# \i 
  /usr/lib/opengroupware.org/Database/PostgreSQL/pg-build-schema.psql
ogo=# \q
logout

Note: the position of the SQL script depends on the Linux distribution. If you can't find it, just perform a find /usr -name "pg-bui*.psql call in the shell to locate the script.

Update: on 1.0a8 RPMs the script is located in /usr/local/lib/opengroupware.org-1.0a/commands/OGo.model/Resources/.