How To Install PostgreSQL Server Into Linux, Debian, Ubuntu, CentOS, Mint, Fedora, Redhat?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-install-postgresql-server-into-linux-debian-ubuntu-centos-mint-fedora-redhat/
PINTEREST
PINTEREST
INSTAGRAM

PostgreSQL is very popular open source database. It is used by big companies like Google, Facebook etc. PostgreSQL can be used without a cost. In this tutorial we will look how to install PostgreSQL into Linux distributions like Debian, Ubuntu, Mint, Fedora, CentOS, RedHat by using different ways like package management or downloading setup file.

Show PostgreSQL Package Version For Ubuntu, Debian, Mint, Kali with Apt

In apt-get  or apt based distros the postgresql server is named as postgresql . We can print and show package related information with  show option. This will list information like version, section, download size, installed size.

Show PostgreSQL Package Version For Ubuntu, Debian, Mint, Kali with Apt
Show PostgreSQL Package Version For Ubuntu, Debian, Mint, Kali with Apt

Show PostgreSQL Package Version For Fedora, CentOS, RedHat with Yum

In yum  or dnf based distros postgresql is named as postgresql-server . We can show detailed packages information like version, arch, size release by using info option.

Show PostgreSQL Package Version For Fedora, CentOS, RedHat with Yum
Show PostgreSQL Package Version For Fedora, CentOS, RedHat with Yum

Install PostgreSQL Package Version For Ubuntu, Debian, Mint, Kali with Apt

Now we can install related postgresql package as we have enough information about the package. We will use install  option in order to install postgresql server. We will also provide -y to automatically accept questions about installation.

Install PostgreSQL Package Version For Fedora, CentOS, RedHat with Yum

We will use yum  or dnf package manager for rpm type. We will use install  option and provide the postgre sql package name which is postgresql-server . We will also provide -y in order to automatically accept asked questions.

LEARN MORE  Php Tutorial

Install With Setup File For All Linux Versions

We have option to installe PostgreSQL Server from binary without using package manager. The adventage of using setup file is getting the latest version of the PostgreSQL Server. But the downside is there may be some incompabilities with the current distribution. We can download the binary setup file from link below.

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#linux

In this case we will download version 10.1 which link is below.

Install With Setup File For All Linux Versions
Install With Setup File For All Linux Versions

than we will start the setup process by running downloaded file with root privileges by using sudo.

Initialize Database

Before starting to use database server we need to initilize the database. We will use postgresql-setup tool. We will provide the --initdb  option which will database directory /var/lib/pqsql/data and /varlib/pgsql/initdb_postgresql.log .

Initialize Database
Initialize Database

Start PostgreSQL Database Service

Now we can start our PostgreSQL Database service. We will use systemctl start  command for this. The PostgreSQL service is named as postgresql.service . We also need root privileges where we will provide with sudo .

Check PostgreSQL Database Service Status

Now everything seems ok but we need to the the service status to be sure. We will use systemctl status  command with the postgresql service name.

Check PostgreSQL Database Service Status
Check PostgreSQL Database Service Status

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-install-postgresql-server-into-linux-debian-ubuntu-centos-mint-fedora-redhat/
PINTEREST
PINTEREST
INSTAGRAM