Installing Postgres (PostgreSQL) in Cpanel Server

PostgreSQL is a free object-relational database server.It offers an alternative to other open-source database systems such as MySQL

Installing Postgres database on Cpanel server is very easy. Just run following command on SSH prompt as root.

root@server1 [~]#  /scripts/installpostgres

The script will fetch Postgres database and required other programs and install.

root@server1 [~]# /scripts/installpostgres
This script will install Postgres 7.3.x or later
If you have an older version installed you wil need to
Dump your databases to a file and then restore them
after the install as 7.3.x is not backwards compatible.
If you do not have any databases, you can just run:
mv /var/lib/pgsql /var/lib/pgsql.old
/sbin/service postgresql stop
/sbin/service postgresql start
to force creating a 7.3.x style setup. Do not do this if
you have databases that you wish to keep!

Are you sure you wish to proceed? y
Repository base is listed more than once in the configuration
Initializing database: [ OK ]
Starting postgresql service: [ OK ]
You should now configure postgresql from WHM!
root@server1 [~]#

Following packages are installed on CentOS server

root@server [~]# rpm -qa | grep postgre

Now login to your WHM, click on Postgres Config under SQL Services. Set a new password for Postgres. You should avoid using any non-alpha numeric charaters as these cause problems.

Go back to the Postgres Config and click on the option to install a postgres pg_hba.conf file.

postgre sql installation on cpanel


You can check  the version of postgresql  by following command :-

root@s709 [~]# postgres –version
postgres (PostgreSQL) 8.1.23

Now Postgres SQL is installed on your server, you will be able to see it in Cpanel.






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s