Installing Postgres for PHP

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Installing Postgres for PHP.

Installing Moodle on Ubuntu with PostgreSQL

Introduction

This section explains how to install Moodle with PostgreSQL on Ubuntu.

Install PosgreSQL

All the documentation has been written here: Install Postgres on Ubuntu

In order to manage Postgres on Ubuntu, you can install pgadmin:

   sudo aptitude install pgadmin3

then run it:

   pgadmin3

Select File menu, Add Server... Enter the parameters you created during your postgres installation. Then you should be able to manage your Moodle database.

Setting up your database during Moodle installation

During the Moodle installation process, on the Database setup page enter:

    Database: postgres7 // Note: it will also work if you installed postgres 8.XX
    Host:  host='localhost' port=5432 dbname='moodle' user='moodleuser' password='password' //change the parameters
    Tables prefix: mdl_
    Leave the other fields blank

Continue the installation, all should work without problem.