Forem Creators and Builders 🌱

Cover image for Installing Forem on Ubuntu 18.04 (Part 3 - PostgreSQL)
Dawood Khan Masood
Dawood Khan Masood

Posted on • Updated on • Originally published at hackhex.com

Installing Forem on Ubuntu 18.04 (Part 3 - PostgreSQL)

If there is anything you would like me to change, please comment. This section of the guide assumes you have already installed NVM, Node and Yarn from the previous article.

Do I really have to type an Alt Text?

Installing PostgreSQL

Forem requires PostgreSQL version 11 or higher. Install the Postgres package, -contrib package and libpq-dev library by typing:

$ sudo apt-get update
$ sudo apt-get install postgresql postgresql-contrib libpq-dev -y
Enter fullscreen mode Exit fullscreen mode

To check if PostgreSQL is installed type:

$ sudo -u postgres psql
Enter fullscreen mode Exit fullscreen mode

The output should be something like this:

psql (10.12 (Ubuntu 10.12-0ubuntu0.18.04.1))
Type "help" for help.

postgres=# 
Enter fullscreen mode Exit fullscreen mode

To exit; simply type "\q" and press enter:

postgres=# \q
Enter fullscreen mode Exit fullscreen mode

The next step is to create a new user by typing:

$ sudo -u postgres createuser -s [USERNAME]
Enter fullscreen mode Exit fullscreen mode

Replace "[USERNAME]" with the user you are currently logged in as.

Oldest comments (0)