How To Install PostgreSQL on Centos 7

September 17, 2016

How To Install PostgreSQL on Centos 7

PostgreSQL, or Postgres, is a relational database management system that provides an implementation of the SQL querying language. It is a popular choice for many small and large projects and has the advantage of being standards-compliant and having many advanced features like reliable transactions and concurrency without read locks.

Step 1. First, add PostgreSQL Yum repository to your system.

Step 2. Install PostgreSQL server.

Once the postgresql94-server package is installed, you need to initialize a database:

Step 3. Start PostgreSQL server.

Step 4. Configure Iptables or firewall.

Adjust iptables to access postgresql from remote systems:

Step 5. Create test database and Create new user PostgreSQL.

Once the installation is completed, you can start using the PostgreSQL 9.4 on your CentOS 7 by typing the commands:

Create test database (as postgres user).

Login test database (as postgres user).

Delete database (as postgres user).

Congratulation’s! You have successfully installed PostgreSQL Server.