How to install PostgreSQL 13 on Debian 10.x step by step

In this article, we will see how to install PostgreSQL 13 on Debian 10.x step by step. PostgreSQL is available in all Debian versions by default.

Steps to install PostgreSQL 13 on Debian 10.x

1. Create the file repository configuration.
Continue reading How to install PostgreSQL 13 on Debian 10.x step by step

How to install PostgreSQL 13 on Fedora

In this article, we will see how to install PostgreSQL 13 on Fedora step by step.

What is PostgreSQL?

PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

Steps to install PostgreSQL 13 on Fedora:

1. Update the packages on Fedora.

sudo dnf update -y

How to install PostgreSQL 13 on Fedora

2. Add the PostgreSQL Yum Repository
Continue reading How to install PostgreSQL 13 on Fedora

PostgreSQL Directory Layout

In this article, we will see PostgreSQL Directory Layout and their purpose.




PostgreSQL Database Directory Layout

 

Installation Directory Layout:

 

     
PostgreSQL is typically installed
to /usr/local/pgsql or /var/lib/pgsql on linux.

     
C:\Program
Files\PostgreSQL\<version number> on windows.

Continue reading PostgreSQL Directory Layout

How to uninstall PostgreSQL from Ubuntu

In this article, we will see how to uninstall PostgreSQL from Ubuntu.

Important Note: I suggest you to take backup of your important PostgreSQL databases. Once we uninstall, all your PostgreSQL data will be lost.

1. Stop PostgreSQL server using below command.

sudo systemctl stop postgresql

Continue reading How to uninstall PostgreSQL from Ubuntu

How to install PostGIS in Ubuntu

In this article, we will see How to install PostGIS in Ubuntu.

What is Postgis?

PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL. postgis is just extension to existing database. That also we have to add as shown below.

Prerequisites to install postgis extension on Linux:
Continue reading How to install PostGIS in Ubuntu

How to install PostgreSQL 13 on Ubuntu 20.04

In this article, we will see how to install PostgreSQL 13 on Ubuntu 20.04.

What is PostgreSQL?
PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

1. Create the file repository configuration:
Continue reading How to install PostgreSQL 13 on Ubuntu 20.04

How to upgrade from PostgreSQL 11 to 12

In this article, we will see how to upgrade from PostgreSQL 11 to 12 on CentSO or Redaht.

We have following options to upgrade from PostgreSQL 11 to 12:

Logical Dump/Restore
Binary In-Place Upgrades(pg_upgrade)
Logical Replication

In this article, we are going to upgrade PostgreSQL 11 to 12 using pg_upgrade binary.

pg_upgrade -b oldbindir -B newbindir -d oldconfigdir -D newconfigdir [option...]

Continue reading How to upgrade from PostgreSQL 11 to 12

How to upgrade from PostgreSQL 10 to 11

In this article, we will see how to upgrade from PostgreSQL 10 to 11 on CentSO or Redaht.

We have following options to upgrade from PostgreSQL 10 to 11:

Logical Dump/Restore
Binary In-Place Upgrades(pg_upgrade)
Logical Replication

In this article, we are going to upgrade PostgreSQL 10 to 11 using pg_upgrade binary.

pg_upgrade -b oldbindir -B newbindir -d oldconfigdir -D newconfigdir [option...]

Continue reading How to upgrade from PostgreSQL 10 to 11

How to install PostgreSQL 13 on Redhat

In this article, we will see how to install PostgreSQL 13 on Redhat.

PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

1. Install the repository

dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

How to install PostgreSQL 13 on Redhat

2. Disable the built-in PostgreSQL module:

dnf -qy module disable postgresql

3. Install PostgreSQL 13 version using below command.

dnf install -y postgresql13-server

4. Now initialize database b running below command.

/usr/pgsql-13/bin/postgresql-13-setup initdb

5. Enable the PostgreSQL service.

systemctl enable postgresql-13

6. Start the PostgreSQL Server on Redhat or CentOS

systemctl start postgresql-13

7. Check the status PostgreSQL on Regdhat or CentOS

systemctl status postgresql-13

Connect to PostgreSQL Server on Redhat/CentOS after installation:

1. Switch to postgres user.

sudo su - postgres

2. Then connect to the PostgreSQL server using psql tool.

psql

3. Now change the password for user “postgres”

alter user postgres with password 'admin@123';

So, in this article, we have explained How to install PostgreSQL 13 on Redhat step by step.

How to install PostgreSQL on Ubuntu

PostgreSQL is a feature-rich, general-purpose database management system. Following are the objectives of PostgreSQL:

  • Robust, high-quality software with maintainable, well-commented code.
  • Low maintenance administration of both embedded and enterprise use.
  • Standards-complaint SQL, interoperability, and compatibility.
  • Performance, security and high availability.
  • Its one of top 5 most used database engine.

Continue reading How to install PostgreSQL on Ubuntu