Installing PostgreSQL in debian 9

Installing PostgreSQL 9.6 in debian 9

 

1. Update the debian 9

$ sudo apt-get update

2. Install the PostgreSQL server and Postgres contrib packages

$ sudo apt-get install postgresql postgresql-contrib

3. Enable and start PostgreSQL

$ systemctl enable postgresql

$ systemctl start postgresql

$ systemctl status postgresql

 

4.  PostgreSQL administrator user

$ sudo su – postgres

$ psql

4.a  Show version

postgres=# SELECT version ();

4.bList available databases

postgres=# \l

Leave a Reply

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