Installation of PostgreSql 9.5 Database Server On Redhat/CentOS 7

2
61
views

PostgreSql  Server is object relational database management server. It’s an open source that uses the SQL language combined with many features to store data and scale database workloads.

It uses the Port No 5432

Features of PostgreSql 9.5

  • Multi-version concurrency control (MVCC)
  • User-defined type
  • Big data features
  • Row-level security policies
  • BRIN (Block range Indexes)
  • Foreign table inheritance

Packages required

  1. postgresql-libs
  2. postgresql
  3. postgresql-server

Installation

You can check what Version is available on your machine

Command is Yum Provide postgresql

See postgresql-9.2.23-3.el7_4.x86_64 is available on my Server Machine.

Step 1: Run below command to install the packages

Yum install postgresql-9.2.23-3.el7_4.x86_64* –y

Step 2 : Verify by installed package

Now initialize the database of postgreSql

Command is postgresql-setup  initdb

Step 2:  check where postgresql data files is stored

Command is ls /var/lib/pgsql/data/

Step 3 : Now start the service and enable at boot time

Systemctl  start  postgresql

Systemctl enable postgresql

Check status

Step 3: login PostgreSql Server

Commands are su – postgres   then access postgresql database  by psql

Step 4:  Check database available by   \l

Now you have successfully PostgreSql installed and tested

You’re done.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here