top ad article

On this tutorial, we will look at how to install PostgreSQL Server 13 on Pop!_OS. PostgreSQL is a named this way because it is a successor for the Ingres database. This database management system is free and open source, which is known to offer storage and scaling of the most complicated data workloads. With its features, developers are able to create apps and administrators that help protect your data and offer easy management of it no matter the size. The following are some of the awesome features of PostgreSQL Server 13;

  • Has the ability to store many types of data
  • Provides data integrity
  • PostgreSQL Server is highly extensible
  • Provides proper internalisation and text search

Install PostgreSQL Server 13 on pop!_OS 20.04|20.10|21.04

The guide below will show you how to install PostgreSQL Server 13 on Pop!_OS, stay tuned until the end of the article. Follow the steps below and you will successfully install PostgreSQL server.

Step 1. Update your system

To update your system, use the following commands;

sudo apt update
sudo apt upgrade -y

Step 2. Reboot your Pop!_OS System

Once done with the updates, reboot your system using the command below;

reboot

Step 3. Add PostgreSQL Server 13 repository on Pop!_OS

This apt repository will help in getting the needed packages from the PostgreSQL repository. To add the APT repository use the commands below. First install wget, then use the command to import the GPG key.

sudo apt -y install vim bash-completion wget
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

The output here is as shown;

[email protected]:~$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
OK

Add the PostgreSQL Server 13 repository on Pop!_OS using the command;

echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee  /etc/apt/sources.list.d/pgdg.list

The i=output

Before you do the installation, you need to update the system first with the command;

Step 4. Install PostgreSQL 13 on Pop!_OS 20.04|20.10|21.04

sudo apt update

Then once the system has been updated, you can now install PostgreSQL 13 on Pop!_OS 20.04|20.10|21.04. To do so, use the command below;

sudo apt install postgresql-13 postgresql-client-13

Below is a section of the output;

[email protected]:~$ sudo apt install postgresql-13 postgresql-client-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libcommon-sense-perl libjson-perl libjson-xs-perl libllvm9 libpq5
  libtypes-serialiser-perl pgdg-keyring postgresql-client-common
  postgresql-common sysstat
Suggested packages:
  postgresql-doc-13 isag
The following NEW packages will be installed:
  libcommon-sense-perl libjson-perl libjson-xs-perl libllvm9 libpq5
  libtypes-serialiser-perl pgdg-keyring postgresql-13 postgresql-client-13
  postgresql-client-common postgresql-common sysstat

PostgreSQL server is bound to come up on every system reboot From there, you can check the status;

 systemctl status postgresql.service 

The output is as shown;

[email protected]:~$  systemctl status postgresql.service
 postgresql.service - PostgreSQL RDBMS
     Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor pr>
     Active: active (exited) since Mon 2021-06-28 22:09:14 EAT; 4min 57s ago
   Main PID: 11269 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 2216)
     Memory: 0B
     CGroup: /system.slice/postgresql.service

Jun 28 22:09:14 pop-os systemd[1]: Starting PostgreSQL RDBMS...
Jun 28 22:09:14 pop-os systemd[1]: Finished PostgreSQL RDBMS.
lines 1-10/10 (END)

Step 5. Test PostgreSQL Server 13 connection

To test if it can connect, use this command;

sudo su - postgres

The output is as follows;

From the image above, you can see that, a connection has been established. Then from here, you can proceed to launch PostgreSQL Server 13 on Pop!_OS.

Step 6. Launch PostgreSQL

To launch PostgreSQL Server 13 from the command prompt, use the following code;

psql

Below is the output;

From the above output, you can see that the process above will enable you to install PostgreSQL Server 13 on Pop!_OS successfully.

Other Posts;

Previous articleInstall MariaDB Server 10.5 on Pop!_OS 20.04|20.10|21.04
Next articleHow to install VScode IDE on Pop!_OS 20.04|20.10|21.04
Valentine is eager to learn new things, technology and life issues. She is curious enough to write about them. And, she uses her platform to educate others regarding the many sectors in life and most importantly technology.

LEAVE A REPLY

Please enter your comment!
Please enter your name here