Question

consultation on support for Postgres as database and php

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


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.