reference linux db psql

Arch Linux PostgreSQL docs

Install

  $ sudo pacman -S postgresql

Setup the data directory

  $ sudo -iu postgres
  [postgres]$ initdb -D /var/lib/postgres/data

Start postgresql.service

  $ systemctl start postgresql.service
  $ systemctl enable postgresql.service

Add user

  [postgres]$ createuser --interactive

Create db

  $ createdb myDatabaseName