Page 1 of 1
How to install PostgreSQL
Posted: Fri Aug 02, 2013 9:57 am
by skid
# Install PostgreSQL server
Code: Select all
yum install postgresql postgresql-server postgresql-contrib
# Initialize database cluster
# Start the server
# Download hba configuration
Code: Select all
wget http://c.vestacp.com/0.9.8/rhel/pg_hba.conf -O /var/lib/pgsql/data/pg_hba.conf
# Set oracle user password
Code: Select all
su - postgres
psql -c "ALTER USER postgres WITH PASSWORD 'pgp4sw0rd'"
# Restart the server
# Enable pgsql databases support in vesta
Code: Select all
Edit /usr/local/vesta/conf/vesta.conf and make it look like DB_SYSTEM='mysql,pgsql'
# Register pg instance in vesta
Code: Select all
v-add-database-host pgsql localhost postgres pgp4sw0rd
# Add user database using webinterface or cli
Code: Select all
v-add-database admin test test test0011 pgsql
Re: How to install PostgreSQL
Posted: Mon Nov 04, 2013 1:31 pm
by KeiroD
skid wrote:# Install PostgreSQL server
Can you do the Debian-based steps as well? Or, would you be willing to check this section out:
http://support.eidolonhost.com/wiki/Ves ... on_VestaCP
Not entirely sure if this will work for Debian-based servers. Unfortunately, I'm not near my test lab for VestaCP, so I can't quite confirm if the steps'll work for Debian-based systems... but I've done what I could.
Re: How to install PostgreSQL
Posted: Mon Nov 04, 2013 8:13 pm
by skid
KeiroD, howto worked like a charm.
I have uploaded pg_hba.conf to debian and ubuntu config directory. So wget command should look like
Code: Select all
wget http://c.vestacp.com/0.9.8/debian/pg_hba.conf -O /var/lib/postgresql/9.1/main/pg_hba.conf
Thank you
Re: How to install PostgreSQL
Posted: Mon Nov 04, 2013 8:15 pm
by KeiroD
skid wrote:KeiroD, howto worked like a charm.
I have uploaded pg_hba.conf to debian and ubuntu config directory. So wget command should look like
Code: Select all
wget http://c.vestacp.com/0.9.8/debian/pg_hba.conf -O /var/lib/postgresql/9.1/main/pg_hba.conf
Thank you
Beautiful, glad to hear it worked perfectly for you as well. :) I'll be updating my guide here shortly to account for that.
Edit:
Note: Each time VestaCP updates their software, this section of the guide will be updated to account for this. However, if you want to update the system's configuration without waiting for us to update the guide, simply substitute 0.9.8 for VestaCP for the newest version of VestaCP and then, for Postgresql, replace 9.1 for the newest version of PostgreSQL.
This was appended to the specific wget section for VestaCP/PostgreSQL.
Feel free to use the wiki format so far as a basis for your own wiki. Or, y'know, set up the wiki similarly to my company's wiki and we can contribute to the wiki.
Re: How to install PostgreSQL
Posted: Thu Oct 08, 2015 3:59 pm
by zaidcrowe
Hi Guys,
I have a related problem - I simply need to connect to a remote Postgres instance, not set one up.
My app is throwing this error: Fatal error: Call to undefined function pg_connect()
When I run: yum install php-pgsql (after yum update)
I get this error:
Code: Select all
Error: Package: php-pgsql-5.3.3-46.el6_6.x86_64 (updates)
Requires: php-common(x86-64) = 5.3.3-46.el6_6
Installed: php-common-5.4.36-1.el6.remi.x86_64 (@remi)
php-common(x86-64) = 5.4.36-1.el6.remi
Available: php-common-5.3.3-40.el6_6.x86_64 (base)
php-common(x86-64) = 5.3.3-40.el6_6
Available: php-common-5.3.3-46.el6_6.x86_64 (updates)
php-common(x86-64) = 5.3.3-46.el6_6
I didn't want to downgrade/switch php version for fear of messing things up - is there another way to achieve what I'm looking to do?
Re: How to install PostgreSQL
Posted: Tue Dec 15, 2015 5:33 am
by liveuk
Hello loving the VestaCP
This thread is 9.1 but the PostgreSQL is now 9.4
On Debian we get
# apt-get install postgresql postgresql-server postgresql-contrib
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package postgresql-server
Please could you guide us through install this and the phppgadmin
to an already install vesta CP on Debian 8 Jessie
Mike
Re: How to install PostgreSQL
Posted: Wed Apr 04, 2018 12:51 am
by weasam
Thanks for your demonstration.
After following your way step by step to installed PostgreSQL. Vesta.conf also configured
The problem I met is even the PostgreSQL on running. but i still can not create a PostgreSQL from vesrtacp. creating the Database only have mysql can select
Machine Information
System: Centos 6
Remote server:66.***.***.150