Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 1.91 KB

README.md

File metadata and controls

85 lines (57 loc) · 1.91 KB

About

The server is powered by a PostgreSQL database.

These installation and setup instructions are specially for Debian/Ubuntu systems, but can be adapted to other flavors of Linux easily.

Installation

Install PostgreSQL using the default package as root/sudo, along with postgresql-contrib, since the data model uses universally unique identifiers (UUIDs) for its table primary keys:

apt-get install -y postgresql postgresql-contrib

Configuration

Once the packages have been installed, create the database user, database itself, and set the access level.

  1. Become or login as the postgres user:
su - postgres
  1. Create the database user (have a password ready):
createuser -P teamworkio
  1. Next, the database itself:
createdb teamworkdb
  1. Then apply the UUID extension:
psql -d teamworkdb
teamworkdb=# create extension "uuid-ossp";
CREATE EXTENSION
teamworkdb=# \q
exit
  1. Configure the client authentication (optional)

Stop the database server:

/etc/init.d/postgresql stop

Then edit the pg_hba.conf file with your desired settings.

Finally, restart the database server:

/etc/init.d/postgresql restart

Installing the data model

With the database created and the postgres server running, install the tables.sql file from this folder, as any system user:

psql -d teamworkdb -U teamworkio < tables.sql

The psql tool will prompt for the password used in step 2, above:

Password for user teamworkio: 

The database will respond with:

CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE