#

## OpenGeo Stack Workshop

# Installing PostgreSQL

This section covers the installation of PostgreSQL, the database engine that PostGIS runs on. Version 8.2 of PostgreSQL will be installed via the PostgreSQL Windows installer.

1. Navigate to the workshop `software` directory.

2. Run the PostgreSQL installer by double-clicking on the file named `postgresql-8.2.msi`, or alternatively by right-clicking on the file and selecting Install.

   Running the PostgreSQL installer

3. Begin the installer by selecting the language of your choice and clicking Start.

   Choosing a language for installation

4. On the Welcome screen click Next.

5. Accept the License Agreement / Installation Notes and click Next.

   Reviewing the PostgreSQL license agreement

6. On the Installation Options screen, accept all the defaults and click Next.

   Specifying PostgreSQL installation options

   Note

   The PostGIS extensions should be left disabled. They will be installed in the next section.

7. On the Service Configuration screen, enter the password “postgres2008” and click Next. When asked to create a new account, click Yes.

   Specifying the postgres account information

   Note

   For security reasons PostgreSQL requires a non-privileged account to be installed. The installer will create one for you. This account can be removed later.

   Creating the postgres account

   Note

   Any warning about weak passwords can be ignored.

8. On the Initialize Database Cluster screen, enter the password “postgres” (note that this is different from the password in the previous step), and click Next.

   Initializing PostgreSQL

   Note

   The database super user is different from the Windows user account created in the previous step.

9. Continue through the rest of the installer accepting the defaults.

   Enabling the PL/pgsql procedural language

   Enabling contrib modules

   Starting the installation phase

10. Finalize the installation and exit the installer.

    Installation progres

    Finishing the PostgreSQL installation

At this point the PostgreSQL database is installed and should be running on the system. The installation can be verified by starting windows command prompt and executing the command:

    C:\Program Files\PostgreSQL\8.2\bin\psql -U postgres -l

If a list of databases is returned then the installation was carried out successfully. In the next section the PostGIS spatial extensions or PostgreSQL will be installed.

### Navigation

- index
- modules |
- next |
- previous |
- OpenGeo Stack Workshop »
- Working With PostGIS »
- Installing PostgreSQL