Tuesday, 24 April 2012

Install postgresql in cpanel server

Run the install script
# /scripts/installpostgres

Then under WHM
 SQL Services >> Postgres Config Select Install config

Once the configuration has been installed, set password for postgresql and open port 5432 if you have firewall.

Now postgresql is installed now and php is not compiled to it. So run easyapache and enable pgsql support.

When you login into the cpanel, you will see phpPgadmin which is a database management tool for postgresql. If not, enable it in WHM >> Feature Manager

Now edit /var/lib/pgsql/data/postgresql.conf and edit some settings:
port = 5432

tcpip_socket = true

listen_address = '*'

Now restart the postgres service:
# service postgres restart

Note that if postgresql is installed on a server that already has users on it, privileges will not be added default for the existing users. Run the below script to add privileges.

# for user in `ls /var/cpanel/users` ; do su $user -c “createuser -S -D -R $i” postgres; done


  1. Great Post, I love to read articles that are informative and actually have good content. Thank you for sharing your experiences and I look forward to reading more.
    linux server management services | cpanel server provider services

  2. For over ten years now I have been managing Hosting Servers and running my own sites, in that time have used quite a few contract Server Admins, ServerBuddies is in my opinion one of the better ones. Why? Because they are willing to go that extra yard and actually HELP when you have a problem, unlike most they will do whatever is needed to get the problem resolved in the shortest possible time-frame without massive expense. They provide quality Server Management, Plesk Support, Server Maintenance, Server Monitoring, Server Troubleshooting and support at a affordable rates. Here are option for Server Management, Server Maintenance, Server Monitoring, Server Troubleshooting, Server Optimization, Plesk Support, Linux Support, cPanel Support and Plesk Support.

  3. Hi,
    Sorry, where on Cpanel or WHM do i find this pah: /var/lib/pgsql/data/postgresql.conf ?

  4. Online businesses receive many connections a day. A delay in responding to those connections ends up in loss of revenue and name. we tend to support remote cPanel server management and our services covers virtually each issue that's typically required.

  5. This comment has been removed by the author.

  6. Thanks, cPanel Server Management which is available 24x7 at 24x7 server support to solve all your cPanel server issues at the affordable prices. Our 24 7 cPanel server support is committed to offering comprehensive 24 7 programs & server administration services to Web Hosts and Data-centers. For more information visit- cpanel server management