How To: Install PostgreSQL 8.3.0, ArcSDE 9.3, and PostGIS 1.3.2 on Windows
The default installation of PostgreSQL 8.3.0 and ArcSDE 9.3 on Windows is described in the installation guide provided with the ArcGIS Server ArcSDE component media. However, the default installation does not include PostGIS 1.3.2. To install ArcSDE 9.3 and PostGIS 1.3.2 in the same PostgreSQL database, some additional steps must be performed. Specifically, the PostgreSQL/EnterpriseDB Stack Builder must be installed and the PostGIS installation must be launched from there. These steps are described below.
Instructions provided describe how to install PostgreSQL 8.3.0, ArcSDE 9.3, and PostGIS 1.3.2 on Windows.
Note: Using the PostgreSQL/EnterpriseDB Stack Builder requires Internet access.
Execute the ArcSDEPostgreSQL.exe found on the ArcSDE installation media, and follow steps 1-4 of the instructions in the topic "Installing PostgreSQL" of the ArcSDE for PostgreSQL installation guide.
When selecting Installation options, enable the Application Stack Builder. To do this, right-click the Application Stack Builder option and select 'Will be installed on local hard drive'.
Continue with steps 6 through 10 in the ArcSDE for PostgreSQL installation guide's "Installing PostgreSQL" topic.
When the PostgreSQL installation is complete, the option to 'Launch Stack Builder at exit' is given. Check this box and click Finish to start the Stack Builder.
Note: The ArcSDE Installation wizard, most likely, opens at the same time as the Stack Builder. This may cause the ArcSDE installation dialog box to open on top of the Stack Builder dialog box. Make the Stack Builder dialog box active and proceed with the installation.
From the drop-down list, select the PostgreSQL cluster that stores the geodatabase and click Next.
The Stack Builder connects to the Internet and displays the options to be installed. Select PostGIS 1.3.2 for PostgreSQL 8.3 v1.3.2 and click Next.
Note: Several choices of PostGIS versions may be offered; however, the currently supported version of PostGIS to be used with an ArcSDE geodatabase is 1.3.2.
Select a mirror site from which to download PostGIS and click Next.
PostGIS 1.3.2 for PostgreSQL 8.3 v1.3.2 should appear under Selected packages. Click Next to start the PostGIS installation.
Accept the license agreement by clicking I Agree on the License Agreement dialog box.
Accept the defaults on the Choose Components dialog box and click Next.
PostGIS should be installed in the PostgreSQL installation location. The Choose Install Location dialog box defaults to the default PostgreSQL installation directory. If PostgreSQL was installed in a different location, specify it in the Destination Folder field and click Next.
Provide the postgres superuser database user name and password and click Next.
Note: The postgres superuser database user name and password is the same one that was created on the Initialize database cluster dialog box of the PostgreSQL Installation wizard.
Create a database that has PostGIS installed in it by typing a name (or accepting the default name) on the Database Name dialog box.
Note: The PostGIS installation adds two databases to the PostgreSQL cluster: the database that is created in this step of the PostGIS Installation wizard and a new template database called template_postgis. The database created in this step can be used to store the ArcSDE geodatabase, or a new database can be created using the template_postgis to store the ArcSDE geodatabase.
When the PostGIS installation completes, click Close and click Finish to dismiss the PostGIS Installation wizard and the Stack Builder.
Continue with the ArcSDE component installation by following the steps in the “Installing the ArcSDE component” topic in the Windows section of the ArcSDE for PostgreSQL Installation guide.
When the ArcSDE component installation completes, continue with the ArcSDE Post Installation wizard.
Follow the instructions in the Post Installation wizard. For all dialog boxes in the Post Installation wizard that require the database name, provide the name of the database that has PostGIS installed in it. This is either the database where PostGIS was installed in step 13, or a database created based on the template_postgis template database. The Post Installation wizard dialog boxes in which this is required are SDE user and tablespace information, User information, and ArcSDE service information.
Note: If the PostGIS database name is not specified, the ArcSDE Post Installation wizard automatically creates a database from the PostgreSQL template1 template database. This database does not have PostGIS installed, therefore, the resultant geodatabase is not able to use PostGIS.
After the ArcSDE Post Installation setup is complete, either open an SQL window in pgAdminIII or launch psql at a DOS prompt, and execute the following SQL statement that gives an SDE user the ability to load PostGIS layers:
Code: grant select, insert, update, delete on public.geometry_columns to sde;
Note: This statement must also be executed for any additional database users who need to create PostGIS layers in the database.