next up previous contents index
Next: PostgreSQL Nonstandard Features by Up: PostgreSQL: Introduction and Concepts Previous: Extending POSTGRESQL

  
Installation

 

Getting POSTGRESQL

The POSTGRESQL software is distributed in several formats:

Because so many formats exist, this appendix will cover only the general steps needed to install POSTGRESQL. Each distribution comes with an INSTALL or README file with more specific instructions.

Creating the POSTGRESQL User

It is best to create a separate user to own the POSTGRESQL files and processes that will be installed. The user name is typically postgres.

Configuration

Many distributions use a configure command that allows users to choose various options before compiling and installing the software.

Compilation

POSTGRESQL is usually distributed in source code format. As a consequence, C source code must be compiled into a format that is understood by the CPU. This process is usually handled by a compiler, often called cc or gcc. Several distribution formats automatically perform these steps for the user.

Installation

The installation process involves copying all compiled programs into a directory that will serve as the home of all POSTGRESQL activity. It will also contain all POSTGRESQL programs, databases, and log files. The directory is typically called /usr/local/pgsql.

Initialization

 Initialization creates a database called template1  in the POSTGRESQL home directory. This database is used to create all other databases. Initdb  performs this initialization step.

Starting the Server

Once template1  is created, the database server can be started. This step typically involves running the program called postmaster.

  
Creating a Database

 Once the database server is running, you can create databases by running createdb from the operating system prompt. Chapter [*] covers POSTGRESQL administration in detail.  


 


next up previous contents index
Next: PostgreSQL Nonstandard Features by Up: PostgreSQL: Introduction and Concepts Previous: Extending POSTGRESQL
Bruce Momjian
2005-04-21