INSTALL.pgsql.txt 1.62 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// $Id$

CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Installation and configuration:
    - Database and user creation
    - Drupal schema loading

INTRODUCTION
------------

This file describes how to create a PostgreSQL database for Drupal.

16 17
If you control your databases through a web-based control panel,
check its documentation, as the following instructions are for the
18 19 20 21 22 23
command line only.

INSTALLATION AND CONFIGURATION
------------------------------

1. CREATE DATABASE USER
24

25 26 27 28 29 30
   This step is only necessary if you don't already have a user setup
   (e.g. by your host) or you want to create new user for use with Drupal
   only. The following command creates a new user named "username" and
   asks for a password for that user:

     createuser --pwprompt --encrypted --no-adduser --no-createdb username
31

32 33 34
   If everything works correctly, you'll see a "CREATE USER" notice.

2. CREATE THE DRUPAL DATABASE
35

36
   This step is only necessary if you don't already have a database
37
   setup (e.g. by your host) or you want to create new database for
38 39
   use with Drupal only. The following command creates a new database
   named "databasename", which is owned by previously created "username":
40

41
     createdb --encoding=UNICODE --owner=username databasename
42

43
   If everything works correctly, you'll see a "CREATE DATABASE" notice.
44
   Note that the database must be created with UTF-8 (Unicode) encoding.
45

46
3. LOAD THE DRUPAL DATABASE SCHEMA
47 48 49

   Once the database has been created, load the required tables into it:

50
     psql -q -f database/database.pgsql databasename username
51 52 53

   If everything works correctly, you won't see any messages.