How to set up PostgreSQL on a Debian or Ubuntu

  1. Install PostgreSQL packages
apt-get install postgresql postgresql-contrib phppgadmin
  1. Download hba configuration
wget http://c.vestacp.com/0.9.8/debian/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf
  1. Restart the server
service postgresql restart
  1. Set oracle user password
su - postgres
psql -c "ALTER USER postgres WITH PASSWORD 'pgp4sw0rd'"
exit
  1. Enable pgsql databases support in vesta. open /usr/local/vesta/conf/vesta.conf and set DB_SYSTEM to 'mysql,pgsql'

6. Register pg instance in control panel
v-add-database-host pgsql localhost postgres pgp4sw0rd
  1. Download phpPgAdmin configuration
wget http://c.vestacp.com/0.9.8/debian/pga.conf -O /etc/phppgadmin/config.inc.php
wget http://c.vestacp.com/0.9.8/debian/apache2-pga.conf -O /etc/apache2/conf.d/phppgadmin
  1. Restart web server
service apache2 restart