From eBabel wiki
Jump to: navigation, search

Setup PostgreSQL for Jira

Login first with the built-in user "postgres"

$ sudo -i -u postgress

The prompt should now be


where "server" is the name of your server.

Create the "jira" user in the database

The jira installer should have already created the os/linux jira user, you can check this via:

$ grep jira /etc/passwd
jira:x:1001:1001:Atlassian JIRA:/home/jira:

Next create the jira database user:

postgres@server:~$ createuser -P -d jira
postgres@server:~$ exit

After exit, you are back on the main Ubuntu prompt "$ "

Switch to user "jira"

$ sudo su - jira

Create a database for Jira, as the "jira" user

$ createdb -E UNICODE -l C -T template0 jiradb

Login to a specific database with that user you created

$ psql -d jiradb

Note: this is using OS level authentication (peer, secure default).

Get the current user

jiradb=# select user;

Get the current date

jiradb=# select current_date;

Install PostgreSQL on Heroku, Ubuntu 16.04

to be detailed...