This post focuses on how to install PostgreSQL Server PostgreSQL, usually known as Postgres, is an open-source, powerful object-oriented relational database. This is the first database management system intended for a UNIX-based environment. However, due to changes in its design over time, PostgreSQL can now run on a variety of operating systems, including Solaris, Mac OS X, and Windows. PostgreSQL is open-source software, with the source code available under the PostgreSQL license. PostgreSQL also has the following features:

  • User-defined data types
  • Table inheritance
  • Sophisticated locking mechanism
  • Foreign key referential integrity
  • Views, rules, subquery
  • Nested transactions (savepoints)
  • Multi-version concurrency control (MVCC)
  • Asynchronous replication
  • PITR(Point-in-Time-Recovery) and reliability

How to Install PostgreSQL Server on Zorin OS

This article is going to explain how to install PostgreSQL server on your Zorin OS and take you through all the necessary installation steps to make sure you install it properly and successully.

Step 1: Update System Packages

Your system should up-to date because it is very likely that you won’t run into any problems.Use the commands below to bring your system up-to date.

$ sudo apt update $ sudo apt -y upgrade

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to

Step 2: Install PostgreSQL Server on Zorin OS

We can install the default version of PostgreSQL Server available on Zorin without performing the Ubuntu repository configuration. Use the command below to install PostgreSQL Server on your Ubuntu based Zorin OS.

$ sudo apt install postgresql postgresql-client

During the installation, a prompt will appear on your screen asking you to confirm whether you wish to proceed with the installation or not. To proceed with the installation, press ‘y’.

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to
Once you have tapped Y as shown above, wait for the installation to complete, like in the image shown below;
install postgresql server on zorin os, install postgresql server 13 on zorin os, how to

Step 3 :Confirm whether PostgreSQL Server is running

The server automatically runs upon the installation but should that not be the case, use the commands below to start, stop and enable the server’s services.

$ sudo systemctl stop postgresql.service $ sudo systemctl start postgresql.service  $ sudo systemctl enable postgresql.service

You can now verify that PostgreSQL Server is running on your system by executing the following command.

$ sudo systemctl status postgresql.service

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to

Step 4: Updating PostgreSQL admin’s user password

A default password is set for the admin during the installation but we need to create a secure password for this admin user. You can change the password using the command below.

$ sudo passwd postgres

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to
Now that PostgreSQL has been installed, you will need to login in order to access the databases and the shell.Use the commands below

$ sudo su -l postgres  $ psql

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to

Step 5: Create database and user

You can create a database from the shell as follows;Use the commands below.

$ createuser dbusergidii $ createdb gidiidb -O dbusergidii $ psql gidiidb

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to
You can list the databases created using the command below.

$ psql -l

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to

Step 6: Configure PostgreSQL Server for remote access

By default, this database server will only listen to local hosts; however, we can access it remotely by making certain changes to its configuration file. We can either limit its listening to a few IP addresses or open its channel to all the IP addresses. We can use the nano command to be able to perform some changes to the configuration file.

$ sudo nano /etc/postgresql/13/main/postgresql.conf

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to
Locate listen_ addresses in the Configuration file and remove the # in front of it. After that, replace localhost with a * sign to allow any IP address to connect to the Database server; however, if you want to confine it to a certain IP address, write it instead of ‘*’. Commas must be used to separate multiple addresses.To save the changes made to the file, type Ctrl + X,Y then hit the enter key.Change the host value as shown below.

$ host        all           all              0.0.0.0/0             md5  $ host        all            all             ::0/0                 md5

install postgresql server on zorin os, install postgresql server 13 on zorin os, how to

Type Ctrl + X,Y then hit the enter key to save the file.

To apply the changes, you need to restart the database server. Use the command below.

$ sudo systemctl restart postgresql

Conclusion

In this article, we looked at PostgreSQL Server as a database server used to manage databases. We have also gone through all the installation steps and installed it successfully. Database management services are required almost in every institution if not all, hence it might be a good idea to learn some basics. Check our other posts on Zorin OS such as;

TECH NEWS RELATED

How to use 2 Gmail accounts on Android phones

In this article, we will learn how to use 2 accounts together Gmail on your Android phone, this will help you quickly capture important information, Email on your device for daily work right on your mobile device. Create Gmail account on Android How to log in to Gmail on the ...

View more: How to use 2 Gmail accounts on Android phones

How to exit Facebook Messenger nick on iPhone, Android phones

How to exit Facebook Messenger nick on iPhone and Android phones is a way to help you log out of your Facebook Messenger account that has been logged in on your phone device. But what do we do when the feature has been hidden? Hide Facebook Messenger nick on Android, ...

View more: How to exit Facebook Messenger nick on iPhone, Android phones

Instructions to create an Android phone password that changes every hour

How to create an Android phone password that changes every hour will be an interesting thing that you can choose on your device with a password layer that is not fixed and people who always borrow your device will not be able to unlock the device. our Android device easily. ...

View more: Instructions to create an Android phone password that changes every hour

Base 13-Inch MacBook Pro With M2 Chip Has Significantly Slower SSD Speeds

Following the launch of Apple’s new 13-inch MacBook Pro with the M2 chip, it has been discovered that the $1,299 base model with 256GB of storage has significantly slower SSD read/write speeds compared to the equivalent previous-generation model. YouTube channels such as Max Tech and Created Tech tested the 256GB ...

View more: Base 13-Inch MacBook Pro With M2 Chip Has Significantly Slower SSD Speeds

How to watch YouTube videos anonymously on Android phones

In this article, TechtipsNReview.com will introduce a new feature of Youtube that is to watch YouTube videos anonymously on Android phones. This is an extremely convenient thing that you can choose to use on your device. How to watch Youtube Videos offline without internet on Android phones, iPhones How to ...

View more: How to watch YouTube videos anonymously on Android phones

iPhone Keeps Disconnecting from WiFi: How to Fix?

If your iPhone Keeps Disconnecting from WiFi, you will have a hard time browsing, texting or getting anything else done on your device. iPhone Keeps Disconnecting from WiFi While users have reported the issue of WiFi Disconnecting from WiFi Network after an iOS update, this problem can occur at any ...

View more: iPhone Keeps Disconnecting from WiFi: How to Fix?

How to adjust the screen brightness of Android phones

To protect the user’s eyes, how to adjust the screen brightness of your Android phone is something you should do during the use of this device. Especially for low-light environments, adjusting the screen brightness appropriately will help you use the device longer and safer. Change screen brightness on Samsung Galaxy ...

View more: How to adjust the screen brightness of Android phones

Dead By Daylight x Fortnite crossover a possibility

Many are surprised to learn that Dead by Daylight may soon be doing a crossover with Fortnite.

View more: Dead By Daylight x Fortnite crossover a possibility

ApeCoin Gains 22% After Debut of Bored Ape-Themed Video With Eminem and Snoop Dogg

Divinity Original Sin 2 encountered an unrecoverable DirectX error

iPhone hangs on apple: Causes and ways to fix it

Instructions to bring the gesture navigation bar of OnePlus 6 to another Android phone

Instructions on how to make video calls between Android phones

How to Silence Unknown Callers to Stop Robocall Spam on iPhone

Razer’s Huntsman Mini unclutters your desk, but it might not be suitable for everyone

Odd Inputs And Peculiar Peripherals: Chorded Keyset Recreates Engelbart’s Vision

MSCOREE.DLL not found or is missing on Windows 11/10

How to create a bookmark save in Fire Emblem Warriors: Three Hopes

6 Best Ways to Fix Moisture Detected Error on Samsung Galaxy Phones

How To Read Enchanting Table Language in Minecraft

OTHER TECH NEWS

Top Car News Car News