PostGIS is an extension to the PostgreSQL relation database management system. This section will first walk through the installation of PostgreSQL and then PostGIS on a Windows XP environment using the provided installer. The latest PostgreSQL installer can be downloaded from http://www.postgresql.org/download/windows .
In the directory C:\workshops\PostGIS\software\ you will find the PostgreSQL installer, called postgresql-8.4.1-1-windows.exe. Double click to execute.
Enjoy the warm welcome, courtesy of EnterpriseDB, then click Next.
In the event that you want to install PostgreSQL application binaries into a non-standard directory, enter the path here. For the purposes of this workshop we will use the default. Click Next.
The directory where PostgreSQL data will reside can also be installed into a non-standard directory. This is especially useful to drop your data on a RAID array. We have no such hardware, so we will be using the default path. Click Next.
Enter a password for the newly-created “postgres” superuser account. Remember this password! We will use the password postgres in our examples, so we will recommend you use this as well.
This is your opportunity to enter a non-standard port for PostgreSQL. For our purposes we will accept the default (5432) and click Next.
Note
Binding PostgreSQL to an alternate port is helpful when upgrading. You can run two instances in parallel until all data has been migrated over and tested, then swap the ports.
The Default Locale option will reflect the locale (location) setting of the host operating system and is sufficient for this workshop. Uncheck the option that says Install pl/pgsql in template1 database. Click Next.
And now we’re ready to go. Click Next...
...and wait for the installation to complete.
Ensure that the Launch Stack Builder at exit? option is selected, then click Finish.
Note
The Application Stack Builder provides you an easy way to install a variety of helpful add-on software to PostgreSQL; PostGIS is one of many such applications.
The Stack Builder needs to know which database to install extensions for. Select the local option as shown and click Next.
There are a number of categories to choose from. PostGIS is available under the “Spatial Extensions” group. Select PostGIS 1.4 for PostgreSQL 8.4 v1.4.0 and click Next.
There is only one Australian mirror for PostgreSQL downloads. Select the FTP option and click Next.
The review page lists all selected packages. You should have only PostGIS 1.4.0 selected. Click Next.
The download is small and shouldn’t take very long.
Once the download is complete you will be presented with the following screen. Click Next to continue.
PostGIS is licensed under the GNU General Public License, the text of which is displayed in the following dialog. Select I Agree to continue.
The PostGIS installer can create a spatially enabled database automatically after installation. For this workshop, we will not make use of this database. Uncheck the Create spatial database box and click Next.
PostGIS needs to know the location of the target PostgreSQL installation. It will determine this automatically if PostgreSQL is installed in the default location. Click Next to continue.
Enter the password you defined for the “postgres” user when installing PostgreSQL and click Next to continue.
After installation, click Close to return to the Stack Builder.
The installation is now complete. Click Finish to exit.