Site icon installvirtual

How to install PostgreSQL 10 on Debian 9

How to install PostgreSQL 10 on Debian 9

In this tutorial, I will show you How to install PostgreSQL 10 on Debian 9. You will see how to Install PostgreSQL 10 on Debian 9 is very easy and quick to install and use.

PostgreSQL 10 Released!

The PostgreSQL Global Development Group is pleased to announce the availability of PostgreSQL 10.

PostgreSQL 10 is a major new version of the world’s most advanced Open Source database. This release includes support for native partitioning, logical replication, SCRAM authentication, further advances in parallelism, and much, much more.

Realed Post: How to install PostgreSQL 10 on Ubuntu 16.04

PostgreSQL Apt Repository

Firstly we need to add PostgreSQL apt repository. Run the following command to add the repo in /etc/apt/sources.list.d/pgdg.list

sudo bash -c "echo deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main >> /etc/apt/sources.list.d/pgdg.list"

Import the signing key

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
sudo apt-key add -

Update the package lists

apt -y update

See also: How to install postgrsql 9.6 on centos 7

Install Postgresql

apt-get install postgresql-10 postgresql-contrib libpq-dev

Start ad enable Services of postgresql

systemctl start postgresql

systemctl enable postgresql

Related Post: How to install postgresql on mac

PostgreSQL installation is done. If you want to use postgreSQL log in postgres account by typing following command

root@installvirtual:~# su - postgres
postgres@installvirtual:~$ psql
psql (10.0)
Type "help" for help.
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres=#
postgres=#

Now use the postgresql as you want to use. To get the help use \h command.

Read Next: How to backup postgresql database
Read Next: How to replicate postgresql database using bucardo

If you have any problem using this tutorial feel free to comment.

Reference: https://www.postgresql.org/download/linux/debian/

Exit mobile version