HostOnNet Blog

Install PostgreSQL on Ubuntu 16.04

Looking for Linux Server Admin or WordPress Expert? We can help.

To install PostgreSQL on Ubuntu, run

apt install postgresql

To check status, run

root@ip-172-31-26-32:~# systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Fri 2017-02-17 20:48:16 UTC; 3min 19s ago
 Main PID: 1375 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service

Feb 17 20:48:16 ip-172-31-26-32 systemd[1]: Starting PostgreSQL RDBMS...
Feb 17 20:48:16 ip-172-31-26-32 systemd[1]: Started PostgreSQL RDBMS.
Feb 17 20:48:21 ip-172-31-26-32 systemd[1]: Started PostgreSQL RDBMS.
root@ip-172-31-26-32:~# 

Using PostgreSQL

root@ip-172-31-26-32:~# su - postgres
postgres@ip-172-31-26-32:~$ psql
psql (9.5.5)
Type "help" for help.

postgres=# 

Back to PostgreSQL

Posted in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.