Install PostgreSQL

Install PostgreSQL
Written by Nilima PaulDecember 9, 2021
9 min read
Nilima Paul

Data Team

Hey guys, I will be clear your all doubts in installing PostgreSQL in my admin, so stay here and keep reading it.

What is PostgreSQL?

PostgreSQL is an item social data set administration framework; it is an open-source information base administration framework that isn't claimed or constrained by anybody organization or distinct individual, it is overseen by online local area engineers likewise by different volunteers; PostgreSQL data set programming was first delivered in the mid of 1990, PostgreSQL data set programming was written in C language, PostgreSQL essential contenders data set like MySQL, MSSQL and Oracle DB, PostgreSQL was supporting all data set element and furthermore support MVCC (Multi-variant simultaneousness control) design.


Advantages and Disadvantages

Following are the Advantages and Disadvantages:


  • Easy to use.
  • Has a user-defined data type.
  • Open-source.
  • A lot of community support.
  • Make use of Stored procedures.
  • It supports ACID, i.e. Atomicity, Consistency, Isolation, Durability.


  • Suppose we see the architecture of Postgre (Structured query language). The above diagram creates separate services for every client, which turns into a lot of memory utilization.
  • If we make a comparison, PostgreSQL is not good when it comes to performance.
  • It is not much popular than other database management systems.
  • This also has a lack of skilled professionals.
  • When it comes to speed, it is not worthy as compared to other tools.
  • Making replication is more complex.
  • Installation is not easy for the beginner.

Prerequisites for PostgreSQL Installation

The following are the prerequisites for PostgreSQL.

1. PostgreSQL on windows; we need to have superuser privileges on MAC, UNIX or Linux systems. To install it on windows, we need to have administrator privileges.

2. To install this on windows, we need to enabled or configured user account control (UAC).

3. We need to have superuser privileges to install it on Linux.

4. Before installing PostgreSQL on the system that we have run an SELinux, We must set it to SELinux on permissive mode.

5. Please find below the example to set SELinux permissive in different environments.

6. We need to install xterm, Konsole, or genome terminal before executing a console-based program by the PostgreSQL enterprise DB installer.

7. For the Windows operating system, we need to update the OS before installing PostgreSQL software. If an error occurred in the middle, we need to exit and update the OS version to the latest operating system version.

8. We need to have RPM (Red hat package manager) of the PostgreSQL database to install it on Linux-like systems.

9. We need to have download PostgreSQL RPM packages from PostgreSQL’s official website.

Steps to Install PostgreSQL on CentOS

Let us discuss the procedure to install PostgreSQL in detail.

Step 1

We have using CentOS version 7.7 to install PostgreSQL.

Step 2

Edit CentOS base repo (Repository file) to install PostgreSQL DB

  • We have using the CentOS base repository to install PostgreSQL on CentOS. We need to exclude the search of PostgreSQL from the repository for installing it from the base repository.
  • Then open the repository file using vi or vim; we have using vi to edit the below file.
  • The file finds the base and updates section in the repository and inserts it by pressing “i” after opening and repository file.
  • Then we need to insert “Exclude = PostgreSQL* in both sections after saving the file using ESC + “wq”.

Step 3

Then we need to install the repository configuration package by using the official PostgreSQL repository for CentOS.

Step 4

Then we list all packages and versions by using the following command. It will show all the PostgreSQL desired versions. We desire a PostgreSQL 11 version.

Step 5

Install PostgreSQL on CentOS by using the following command.

  • We need to install the PostgreSQL client and PostgreSQL server to install the PostgreSQL database.
  • Also, we need to install the PostgreSQL libs package for resolving dependency to install the PostgreSQL DB server.
  • For installing this, we need to install the below package as follows.
  1. Postgresql 11 server
  2. Postgresql 11
  3. Postgresql 11 libs
  • PostgreSQL 11 and Postgresql 11 libs are dependency packages to install the PostgreSQL DB server.

Step 6

After installation, we need to initialize steps to create a new database cluster of the PostgreSQL database.

  • We need to create a PostgreSQL database cluster before using the database.
  • PostgreSQL cluster is nothing but the collection of databases that was managed by a single server instance.
  • Creating of database cluster will create a new physical file of the data directory and database files.
  • It will also create catalog tables and creates template 0, template 1, and Postgres database.
  • Template 0 and template 1 database is used to create a new database for the user.
  • Postgres database is a default database for connections of administrative users and application users.
  • Below is the command to initialize the PostgreSQL database cluster is as follows.
  • The below command will initialize the database, and database files also initialize the administrative database.

Step 7

Now we need to enable and start the PostgreSQL service by using the systemctl command.

Step 8

Log in to the PostgreSQL database by using the default authentication method.

  • Default PostgreSQL database uses roles to handle the authentication and authorization.
  • It default uses an ident authentication method to authenticate the database with users.
  • It will manage OS authentication with database users.
  • The procedure creates OS level and DB level users by default; it will access the database the first time with the ident authentication method.
  • Below is the authentication method available in PostgreSQL.
  1. MD5
  2. What is PostgreSQL
  3. Peer
  4. LDAP
  5. Trust
  6. Kerberos

Below is the process to access the PostgreSQL database for the first time.


It is an open-source information base administration framework. It is likewise an item social data set administration framework. A solitary organization or individual doesn't deal with the PostgreSQL information base; it has overseen by local area designers or different volunteers. It is generally famous in the social data set administration framework.

Was this blog helpful?
You must be Logged in to comment
Code Block
Nilima Paul
Data Team
117 Blog Posts
0 Discussion Threads
Trending Categories
Frontend Development24
Backend Development20
Server Administration17
Linux Administration24
Data Center24
Penetration Testing14

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:


Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright @2020
made with by Abhishek & Priyanka Jalan