Child pages
  • Setup PostgreSQL on Linux

Versions Compared

Key

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

Install PostgreSQL

To install PostgreSQL use your Linux's package system or install it manually by downloading it from http://www.postgresql.org/download/ 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
Info

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