consultation on support for Postgres as database and php

May 24, 2016 250 views
PostgreSQL PHP Frameworks

good day ocean digital gentlemen , I want space to place a php application code and data base in postgres . elavoracion is to draft college thesis . for a final project. I want to know if you support postgres as only see description mysql and others.
Thanks for your reply.

Esvin Sinay

1 Answer

Our droplets are Linux based virtual machines where you receive root (administrator) access and can install whatever software you like. To install a stack including Apache, PHP and PostgreSQL you could create a new Ubuntu 14.04 droplet, log in and run the following commands:

apt-get update
apt-get install apache2 php5 install postgresql postgresql-contrib php5-pgsql libapache2-mod-php5

You will need to then create a database user and configure Postgre, this guide will walk you through that. When complete your web root (where to put your php files) will be /var/www/html

If you would prefer to use php 7, I would recommend using an Ubuntu 16.04 droplet and in the command above, replace "php5" with "php7.0" in all the package names.

by Justin Ellingwood
PostgreSQL is one of the most powerful and popular relational database management systems available for open source platforms. In this guide, we'll talk about how to get it up and running on an Ubuntu 14.04 VPS instance.
Have another answer? Share your knowledge.