How to Install PostgreSQL on Fedora 28 Server

Hello everyone, welcome to Fedora Tutorial. Today, we are going to install PostgreSQL on Fedora 28 Server. If you are running Ubuntu, please follow this tutorial to install PostgreSQL Server on Ubuntu. Installing PostgreSQL on Fedora 28 is pretty easy and straightforward. 

Steps to install PostgreSQL on Fedora 28 Server

Step 1. Update your system

First, let’s make sure our system is up to date. Use this command to update Fedora

dnf update

Step 2. Install PostgreSQL

Next, use this command to install PostgreSQL

dnf install postgresql

The command will download some packages from the internet. Make sure you are connected to the internet when executing this command. 

Alternative Way

There are some other ways to install PostgreSQL on Fedora 28. If you are running Fedora 28 Workstation, you may use the installation package by EnterpriseDB. It provides a seamless way to install PostgreSQL on a various system including Linux. 

Download EnterpriseDB package for Linux 64 bit

Please make sure you select the PostgreSQL version and operating system from the list. 

After download, you will have a new file, for example: postgresql-10.4-1-linux-x64.run

Now right click the file and select Properties, we are going to make the file executable. Go to Permissions tab and check the option Allow executing as program. 

install postgresql on fedora 28

Now let’s install the package. If you prefer the GUI installation, you will have to switch to superuser (root) to execute the installation file. Or, you can use Terminal to install the package.

su
./postgresql-10.4-1-linux-x64.run

Follow the instruction shown on your screen. You will need to specify the installation directory, create new password for user postgres. Don’t worry, the default value should work. 

Example:

Pre Installation Summary

The following settings will be used for the installation::

Installation Directory: /opt/PostgreSQL/10
Server Installation Directory: /opt/PostgreSQL/10
Data Directory: /home/dhani/Downloads/y
Database Port: 5432
Database Superuser: postgres
Operating System Account: postgres
Database Service: postgresql-10
Command Line Tools Installation Directory: /opt/PostgreSQL/10
pgAdmin4 Installation Directory: /opt/PostgreSQL/10/pgAdmin 4
Stack Builder Installation Directory: /opt/PostgreSQL/10

Press [Enter] to continue:

We recommend you to opt in the PgAdmin 4 during the installation. This PgAdmin will help you to manage your PostgreSQL Server via web browser.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.