HowTo: Install OpenGroupware.org on Ubuntu 8.04 amd64 server with LDAP support (part 2 of 4)
Having built the binaries for OpenGroupware.org, we now need a database. OpenGroupware.org uses PostgreSQL. Install that:
sudo apt-get install postgresql
Create the database:
sudo su - postgres
createdb OGo
createuser -A -D OGo
Reply to createuser that the new user will not be able to create new roles, as it’s unnecessary. “-A” creates a regular user (instead of a superuser). “-D” denies the new user the ability to create databases.
Quit from the postgres shell:
exit
Edit the file /etc/postgresql/8.3/main/pg_hba.conf:
sudo nano /etc/postgresql/8.3/main/pg_hba.conf
Add the following:
host OGo OGo 127.0.0.1/32 trust
before the line
host all all 127.0.0.1/32 md5
And then restart PostgreSQL:
sudo invoke-rc.d postgresql-8.3 restart
This way, anyone trying to connect to the database as user “OGo” will always get in. It works only from the local machine, so if you have control over your users, everything should be alright. (You should note though that any user logged into your machine can access the whole OGo database!)
Now we need to install the database schema:
cd /usr/local/lib64/opengroupware.org-1.1/commands/OGo.model/Resources
psql -h localhost OGo OGo
\i pg-build-schema.psql
\q
Now we have to set up the database connection in OpenGroupware.org:
sudo su - ogo
source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
Defaults write NSGlobalDomain LSConnectionDictionary ‘{databaseName = OGo; hostName = localhost; password = “”; port = 5432; userName = OGo}’
Defaults write NSGlobalDomain LSAdaptor PostgreSQL
/usr/local/sbin/ogo-webui-1.1
You should now be able to access http://<yourhost>/OpenGroupware and be automatically logged in as root.
That’s it for the database setup!


October 24th, 2008 at 11:58
[...] Second part: Database [...]
October 28th, 2008 at 16:32
[...] « HowTo: Install OpenGroupware.org on Ubuntu 8.04 amd64 server with LDAP support (part 2 of 4) HowTo: Install OpenGroupware.org on Ubuntu 8.04 amd64 server with LDAP support (part 4 of 4) [...]