Steps to Install and Configure PostgreSQL in cPanel

How to Install and Configure PostgreSQL

PostgreSQL is a general purpose database management system developed based on POSTGRES 4.2. PostgreSQL was designed to run on various platforms such as Solaris, Windows etc. It is a free and open source software that gives us the ability to modify PostgreSQL in any form. Early on, PostgreSQL was designed to run on UNIX-like platforms  and later it was designed to be portable. Due to it’s stability it requires only minimum efforts to manage. The cost of developing web applications using PostgreSQL is low when compared to other database management systems.

 Features of PostgreSQL are: 

1) Stable

2) Portable

3) Cost less

4) Extensible

5) User-defined types

6) Table inheritance

7) Sophisticated locking mechanism

8)Foreign key referential integrity

9)Views, rules, sub-query

10)Nested transactions (save points)

11)Multi-version concurrency control (MVCC)

12)Asynchronous replication

PostgreSQL implements a multi-version concurrency control (MVCC) feature. This MMVC feature is known as snapshot isolation in Oracle. Another feature of PostgreSQL is that it allows you to add custom functions using different programming languages such as C/C++, Java, etc. In PostgreSQL, we can define data types, index types, functional languages, etc. We can also develop a custom plugin to enhance it in order to meet our requirements. PostgreSQL is a good option if you want stronger security, compliance, stored procedures, and need a database for a strong back-end application. MySQL is the better option if you want to use a more ubiquitous platform, tighter security, and work mostly with website CMS platforms.

PostgreSQL uses a client/server model. The PostgreSQL server can handle multiple concurrent connections from clients. It supports one storage engine with tight integration between the storage engine and the rest of the database. PostgreSQL can compress and decompress it’s data using fast compression scheme to fit more data in an allotted disk space. The advantage of compressed data, besides saving disk space, is that reading data takes less IO, resulting in faster data reads. PostgreSQL runs on operating systems such as Linux, UNIX and programming languages such as C, C++, Java, Perl, Python, and Ruby.


Tools to manage PostgreSQL

1) psql: It is a command line tool and the primary tool to manage PostgreSQL.

2) phpPgAdmin: It is a web-based administration tool for PostgreSQL written in PHP.

3) pgFouine: It is a log analyzer which creates reports from PostgreSQL log files.


Steps to install and configure PostgreSQL

1) Run /scripts/installpostgreSQL command.

2) Navigate to Configure Postgres interface (Home >> SQL Services >> Configure Postgres).

3) To install PostgreSQL, click Install Config.

4) To add current cPanel users to PostgreSQL, Click Create Users.

5) Enter password in the Enter New Password box.

6) Confirm password and click Change password.


To restart PostgreSQL

service postgresql restart


Editing PostgreSQL configuration file

vim /var/lib/pgsql/data/postgresql.conf file.



1) It is an open-source SQL standard compliant RDBMS.

2) Provide strong community.

3) Provide strong third-party support.

4) Stored procedures.

5) Extensible.

6) Object-oriented.



1) Struggles with large read-heavy operations against a database.

2) Less popularity.

3) Less open-source documentation and collaboration.

4) Different SQL syntax than traditional MySQL/Microsoft SQL solutions.


If you need any further assistance please contact our support department.