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
postgresql-libs-8.1.23-1.el5_7.3
postgresql-8.1.23-1.el5_7.3
postgresql-devel-8.1.23-1.el5_7.3
postgresql-server-8.1.23-1.el5_7.3
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.
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.