OpenGeo

OpenGeo Stack Workshop

Previous topic

Working With PostGIS

Next topic

Installing PostGIS

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.

    ../_images/postgres_install01.jpg

    Running the PostgreSQL installer

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

    ../_images/postgres_install02.jpg

    Choosing a language for installation

  4. On the Welcome screen click Next.

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

    ../_images/postgres_install03.jpg

    Reviewing the PostgreSQL license agreement

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

    ../_images/postgres_install04.jpg

    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.

    ../_images/postgres_install05.jpg

    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.

    ../_images/postgres_install06.jpg

    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.

    ../_images/postgres_install07.jpg

    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.

    ../_images/postgres_install08.jpg

    Enabling the PL/pgsql procedural language

    ../_images/postgres_install09.jpg

    Enabling contrib modules

    ../_images/postgres_install10.jpg

    Starting the installation phase

  10. Finalize the installation and exit the installer.

    ../_images/postgres_install11.jpg

    Installation progres

    ../_images/postgres_install12.jpg

    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.