Steps to install PostgreSQL on Linux Mint 20 ?

PostgreSQL is a cross-platform relational database management system (DBMS) which is also known as Postgres.
It is a free and open-source DBMS and it supports multiple operating systems including Linux, macOS, and Windows.
This DBMS allows those transactions that have ACID properties i.e. Atomicity, Consistency, Isolation, and Durability.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to fix Database related errors.
In this context, we shall look into how to install this relational DBMS on the Linux operating system.

Steps to install PostgreSQL on Linux Mint 20 ?

To get PostgreSQL installed on your Linux Mint 20 system, you need to follow all the steps stated below:

Step # 1: Updating and Upgrading the Linux Mint 20 System:

i. For updating your Linux Mint 20 system, you should run the following command after launching the terminal by clicking on its shortcut icon:

sudo apt update

Once your system has updated all the necessary packages and dependencies, you will see the output on your terminal.

ii. Now it is the turn to upgrade your Linux Mint 20 system by running the following command in the terminal:

sudo apt upgrade

The up-gradation process will take a sufficient time to complete.

Step # 2: Installing PostgreSQL on Linux Mint 20:

Once our Linux Mint 20 system has been successfully updated and upgraded, we are all set to install on it by running the following command in the terminal:

sudo apt install postgresql

During the execution of this command, as soon as you will be prompted to provide your confirmation, then do this by typing in "Y" for carrying on smoothly with your installation.

Step # 3: Checking the Status of PostgreSQL:

Before accessing the PostgreSQL console, we need to verify whether this service is active or not by checking its status. The status can be checked by running the following command in the terminal:

sudo systemctl status postgresql

Running this command will display the status. With this, you can verify that the PostgreSQL server is active. However, it will not be running, instead, it will show the "exited" status which means that you need to log in to the server.

Step # 4: Logging in to the PostgreSQL Server:

For accessing the console, we first need to log in to the PostgreSQL server by running the following command in our terminal:

sudo –i –u postgres

When you will run this command, you will immediately be logged into the server.

Step # 5: Accessing the PostgreSQL Console:

Now for accessing the console, we will run the command stated below while being logged in to the PostgreSQL server:

psql

Running this command will take us straight to the console.
You can exit from the console at any time by typing "\q" in this console and then pressing the Enter key.

[Need urgent support to install PostgreSQL on Ubuntu? We are available to help you today. ]

This article will guide you on the steps to #install #PostgreSQL on your #Linux #Mint 20 system and hence you can use it for efficiently managing your relational #databases. PostgreSQL is an advanced version of #SQL which provides support to different functions of SQL like foreign keys, #subqueries, #triggers, and different user-defined types and functions. To install PostgreSQL Linux Mint: 1. Add the #PGDG APT source file. 2. Add the PostgreSQL Package Repository Key. 3. Update, Upgrade, and Install PostgreSQL. 4. The postgres user. 5. The postgres database. 6. The #psql #Command Line Utility. 7. Create super user account. 8. Login using our newly created account.

Related Posts