Child pages
  • Setup PostgreSQL on Linux

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Install PostgreSQL

To install PostgreSQL use your Linux's package system or install it manually by downloading it from and following their instructions.

Create database

With PostgreSQL installed and started, create a database named eHour by executing:

Code Block
createdb ehour
Install eHour database

With the ehour database created, the next step is to create and initialize the datamodel.

In eHour's sql/postgresql/install directory there's a fresh.postgresql.sql script which contains the datamodel and default data.

Execute it by running the following command:

Code Block
psql -U ehour -h localhost ehour < fresh.postgresql.sql

The standalone distribution does not contain the fresh.postgresql.sql file. The file is available at at this location.