1.Install the latest version of the cpanel.
2.Log into the server using the root
3.If you have already installed the Postgresql means,take the backup of the database.
4.If you do not wish to move the database,then move the database to some other directory,using the command
mv /var/lib/pgsql /var/lib/pqsql.old
5.To install the postgresql using the command
/scripts/installpostgres
6.Now restart the postgres services.
7.Type a new Postgresql password in the text box and click change password
8.Now you can access Postgresql via cpanel.