Thursday, 19 December 2019

How to Install PostgreSQL 12 on CentOS/RHEL/OEL 7

This article will help you to install PostgreSQL 12 on CentOS/RHEL/OEL 7 system.

1. Configure Yum Repository

# rpm -Uvh

2. Install PostgreSQL 12 on CentOS

# yum install postgresql12-server

3. Initialize PGDATA

# /usr/pgsql-12/bin/postgresql-12-setup initdb

PostgreSQL 12 default data directory location is /var/lib/pgsql/12/data

4. Enable PostgreSQL Server on reboot

# systemctl enable postgresql-12.service

5. Start PostgreSQL Server

# systemctl start postgresql-12.service

6. Verify PostgreSQL Installation

# su - postgres -c "psql"

psql (12.0)
Type "help" for help.


You may create a password for user Postgres for security purposes.

postgres=# \password postgres

Thanks!!!!!!!!!! Enjoy Programming!!! :)

No comments:

Post a Comment

Thanks for your valuable comments.