The POSTGRESQL software is distributed in several formats:
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.
Many distributions use a configure command that allows users to choose various options before compiling and installing the software.
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.
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 creates a database called template1 in the POSTGRESQL home directory. This database is used to create all other databases. Initdb performs this initialization step.
Once template1 is created, the database server can be started. This step typically involves running the program called postmaster.
Once the database server is running, you
can create databases by running createdb from the operating
system prompt. Chapter covers POSTGRESQL
administration in detail.