ArcGIS® 9 Installation Guide: ArcSDE® for PostgreSQL

offbeatlossData Management

Nov 22, 2012 (4 years and 11 months ago)

604 views

ArcGIS
®
9
Installation Guide: ArcSDE
®
for PostgreSQL
Copyright © 2006 - 2008 ESRI
All Rights Reserved.
Printed in the United States of America.

The information contained in this document is the exclusive property of ESRI. This work is protected under
United States copyright law and the copyright laws of the given countries of origin and applicable international
laws, treaties, and/or conventions. No part of this work may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying or recording, or by any information storage or retrieval
system, except as expressly permitted in writing by ESRI. All requests should be sent to Attention: Contracts
Manager, ESRI, 380 New York Street, Redlands, CA 92373, USA.
The information contained in this document is subject to change without notice.
RESTRICTED/LIMITED RIGHTS LEGEND
U.S. Government Restricted/Limited Rights: Any software, documentation, and/or data delivered hereunder is
subject to the terms of the License Agreement. In no event shall the Government acquire greater than
RESTRICTED/LIMITED RIGHTS. At a minimum, use, duplication, or disclosure by the Government is subject
to restrictions as set forth in FAR §52.227-14 Alternates I, II, and III (JUN 1987); FAR §52.227-19 (JUN 1987);
and/or FAR §12.211/12.212 [Commercial Technical Data/Computer Software]; DFARS §252.227-7015
(NOV 1995) [Technical Data]; and/or DFARS §227.7202 [Computer Software], as applicable.
Contractor/Manufacturer is ESRI, 380 New York Street, Redlands, CA 92373-8100, USA.
ESRI, MapObjects, ArcView, ArcIMS, ArcSDE, ArcInfo, ArcEditor, ArcGIS, ArcMap, ArcCatalog, ArcToolbox,
ArcObjects, MapObjects, SDE, and the ESRI globe logo are trademarks of ESRI, registered in the United States
and
the European Community, or certain other jurisdictions
. www.esri.com is a service mark of ESRI.
The names of other companies and products mentioned herein are trademarks or registered trademarks of their
respective trademark owners.



iii
Table of Contents
Introduction..................................................................................................5

Installations on Windows.................................................................................7

Preinstallation.............................................................................................8

System requirements................................................................................8

To obtain an authorization file....................................................................9

Installing PostgreSQL...............................................................................10

Configuring the PostgreSQL database cluster to accept client connections........16

Installing the ArcSDE component..................................................................18

Postinstallation..........................................................................................19

Postinstallation overview..........................................................................19

Setting up the sde user environment..........................................................22

Setting up the geodatabase repository........................................................25

The ArcSDE component authorization.........................................................27

Creating an ArcSDE service.......................................................................31

Uninstalling...............................................................................................33

Uninstalling the ArcSDE component............................................................33

Uninstalling PostgreSQL from Windows.......................................................33


Installations on Linux....................................................................................35

System requirements..................................................................................36

Installation overview for Linux.....................................................................37

Installing and configuring PostgreSQL...........................................................39

Preinstallation setup.................................................................................39

Installing PostgreSQL on Linux..................................................................40

Creating and configuring a PostgreSQL database..........................................43

Installing the ArcSDE component..................................................................47

ArcSDE postinstallation setup.......................................................................50

ArcSDE component authorization...............................................................53

Starting an ArcSDE service on Linux...........................................................54

Uninstalling...............................................................................................55

Uninstalling the ArcSDE component............................................................55

Uninstalling PostgreSQL from a Red Hat Linux box.......................................55

Installation guide: ArcSDE for PostgreSQL
iv
Installing the DBMS and ArcSDE on different servers..........................................57

Installing the DBMS and the ArcSDE component on different machines..............58

Scenarios for installing the ArcSDE component and PostgreSQL on separate
machines..................................................................................................61

Both servers are running Windows.............................................................61

Both servers are running Linux..................................................................64

ArcSDE is installed on a Windows server and PostgreSQL is installed on a Linux
server....................................................................................................66

ArcSDE is installed on a Linux server and PostgreSQL is installed on a Windows
server....................................................................................................68

Accessing ArcSDE documentation and the next steps.........................................73


5

Introduction
This installation guide includes information on installing PostgreSQL 8.3.0 on
Microsoft
®
Windows and Red Hat
®
Linux
®
operating systems. It also includes
information on installing the ArcSDE
®
for PostgreSQL component of ArcGIS Server
®

Enterprise on Windows, Red Hat Linux, and SUSE
®
Linux, setting up your
geodatabase, and creating an ArcSDE service.
Each ArcSDE disk contains folders named by platform. These contain the following:
• Folders named for each database—These contain the installation files for
the ArcSDE component for the database indicated.
• Software development kit (SDK) folders ArcSdeSDK and
documentation_sdk—These contain the installation file for the developer
kit and the developer documentation respectively.
• A documentation_server folder—This contains the ArcSDE administration
command reference and the installation guides, one of which you are
reading now. The administration command reference contains syntax and
usage for the ArcSDE commands, the installation guides contain
instructions for the installation and setup of the ArcSDE component.
• A license folder—This folder holds the ArcGIS Server license file.
• A source folder containing the PostgreSQL installation files
The installation of ArcSDE for PostgreSQL is a three step process.
1. Preinstallation: Install and configure PostgreSQL. On Windows, the
setup program will install the Microsoft Windows Installer if required before
continuing with the installation, and the PostgreSQL installation wizard will
take you through the installation. When the installation is finished, the
ArcSDE installation wizard will launch. On Red Hat Linux machines, you can
run the scripts provided on the installation media to install and set up the
PostgreSQL database cluster, or you can manually install it.
For SUSE Linux machines, you need to obtain the PostgreSQL installation files
yourself. Source files for PostgreSQL 8.3.0 can be obtained from the
PostgreSQL site.
2. Installation: Install ArcSDE for PostgreSQL. After ArcSDE for PostgreSQL
is installed on Windows, you have the option to start the ArcSDE component
installation wizard. On Linux machines, you will run the ArcSDE component
installation file provided on the DVD.
3. Postinstallation: Perform the postinstallation setup, which defines the
ArcSDE administrative user's (the sde user's) environment, sets up the
geodatabase repository, authorizes ArcSDE, and creates the ArcSDE service.
On Windows platforms, you can run the Post Installation wizard to complete
these tasks. On Linux, you manually alter the services.sde file and perform
these tasks at the shell command prompt using ArcSDE administration
commands sdesetup and sdemon.
Installation guide: ArcSDE for PostgreSQL
6
For guidelines on optimizing both your PostgreSQL server and ArcSDE server
configurations, see the help topics in the section Geodatabases and
ArcSDE/Administering ArcSDE geodatabases in the ArcGIS online help at
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm prior to installing the software.
The same topics are also available in the help installed with ArcGIS Server and
ArcGIS Desktop.


7







Installations on Windows
Installation guide: ArcSDE for PostgreSQL
8

System requirements
For the latest in supported system environments, see http://support.esri.com, and
navigate to Software > ArcGIS Server > System Requirements.
Your computer is required to meet these minimum system requirements to install
ArcSDE for PostgreSQL.
The following lists the minimum system requirements for ArcSDE for PostgreSQL:
Operating system
• Microsoft Windows Server 2003
®

• Microsoft Windows 2000
®
service pack 3 or later

Free disk space
Installing the ArcSDE component on Windows requires approximately 200MB.
Installing PostgreSQL requires approximately 100MB.


9

To obtain an authorization file
Each server where the ArcSDE component is installed requires an authorization file.
Each new version of ArcSDE requires a new authorization file.
There are several ways to obtain an authorization file and register the ArcSDE
component of ArcGIS Server Enterprise. You can visit https://service.esri.com to
obtain an authorization file (by email, fax, phone, or mail) before installing the
ArcSDE component. On Windows, you can also obtain an authorization file and
register ArcSDE using the Post Installation wizard. See ArcSDE authorization for
registration methods using the Post Installation wizard.
Installation guide: ArcSDE for PostgreSQL
10

Installing PostgreSQL
Follow the steps below to install PostgreSQL on Windows.
How to prepare to install PostgreSQL
1. Log into the computer where you will be installing the software as a user with
administrative privileges.
2. Close all applications on your computer.
3. Insert the ArcSDE component media into the appropriate drive and follow the
directions on How to install PostgreSQL.
How to install PostgreSQL
Note: If you plan to install PostgreSQL using Remote Desktop, you must use the
Windows mstsc.exe and be sure to grant the postgres service account full
permissions to the directory on the remote machine to which PostgreSQL is being
installed.
1. Choose the ArcSDE for PostgreSQL option on the ArcSDE installation dialog
box.
2. The Installation dialog box gives you the option to install PostgreSQL and
install ArcSDE. If you leave both checked, the PostgreSQL installation will
launch first.
Note: If you already have a nonsupported version of PostgreSQL installed,
you will be prompted to either remove the existing instance, upgrade it, or
install into a different directory, depending on what version of PostgreSQL you
already have installed. If you are prompted to remove or upgrade the existing
instance, you should create a backup of the PostgreSQL instance before
proceeding with the uninstallation or upgrade. If you have a supported
version of PostgreSQL installed, the installation wizard will detect this, skip
the PostgreSQL installation, and go directly to the ArcSDE component
installation.
3. Click Next on the Welcome dialog box.
4. Read the PostgreSQL installation notes. When you have finished reading, click
Next.
5. Click the drop-down next to National language support and click Will be
installed on local hard drive.

11

If you want to have the option to install additional PostgreSQL components,
such as database drivers, Slony-I, PostGIS, or Ruby on Rails, click the drop-
down next to Application Stack Builder and click Will be installed on local hard
drive.

Installation guide: ArcSDE for PostgreSQL
12
Click Next.
6. Create or designate an account to run the PostgreSQL service. This is a
nonadministrative Windows account. If you have already created an account
to use for this purpose, type the name of the account in the Account name
field and the password for the account in the Account password and Verify
password fields. If you have not created an account, you can leave the default
postgres name or type a new name in the Account name field, then type a
password in the Account password and Verify password fields, and the
installation wizard will create the account for you.

Leave Install as a service checked.

Click Next.
Note: If you do not supply a strong password (such as one that letters,
numbers, and special characters), a message will be returned indicating your
password is weak. This dialog box gives you the opportunity to have the
server assign a random password. Click Yes if you want a random password
assigned. Click No to keep your weak password.
7. Create a database cluster by leaving Initialize database cluster checked.

Assign a port number for connections by using the default number (5432) or
typing another port number. Note: If you use a service number other than
the default, you must set the PGPORT environment variable to point to the
port number you use.

Set up the instance to accept network connections by checking Accept

13
connections on all addresses, not just localhost.

Choose the locale for your database cluster and the encoding for the server
on which the database cluster resides and client machine using the
corresponding drop-down menus. UTF-8 is recommended for the encoding to
take advantage of Unicode capabilities; however, this is not required. The
client encoding will be detected as the encoding of the machine from which
you are running the installation. Also, unless you need to specify a locale for
your databases, it is recommended you accept the C locale because using
other locales could slow the performance of string operations.

Create a postgres super user account. You must use the default name of
postgres. Type a password for the super user in the Password field and
confirm it by typing the password in the Password (again) field.

Click Next.
8. Enable PL/pgsql by accepting the defaults. Click Next.
Installation guide: ArcSDE for PostgreSQL
14

9. Install the Adminpack and plDebugger contrib modules.

Click Next.

15
10. Click Next on the Ready to install dialog box.
11. A progress bar displays. When the PostgreSQL installation is complete, the
Installation complete dialog box appears.

Note: You can add your email to the PostgreSQL mailing list if you want by
clicking the Subscribe to pgsql-announce button. This requires an Internet
connection.

Click Finish to exit the PostgreSQL installation wizard. When the PostgreSQL
installation completes, the wizard proceeds to the ArcSDE component
installation.
Note: If you are installing the ArcSDE component on a different computer than the
one where you installed PostgreSQL, stop here. Go to the computer where you are
installing the ArcSDE component of ArcGIS Server Enterprise, insert the DVD, and
launch the ArcSDE for PostgreSQL installation. When you get to the Installation
dialog box, uncheck PostgreSQL, leave ArcSDE for PostgreSQL checked, and click
Install. This starts the ArcSDE component installation. Follow the instructions in the
next section for installing the ArcSDE component. Also read the topic Installing the
DBMS and the ArcSDE component on different machines for more details on
additional steps necessary for this type of installation.
If you chose to install the Application Stack Builder and plan to use the PostGIS
geometry type, you can install PostGIS at this time, or you can install it after
installing the ArcSDE component. Just be sure to install PostGIS before proceeding
with postinstallation setup.
Installation guide: ArcSDE for PostgreSQL
16

Configuring the PostgreSQL database cluster to accept client
connections
Once the database you will use for your ArcSDE geodatabase has been created, you
will need to alter the pg_hba.conf file to allow other machines to connect to it.
Before you do this, make a backup copy of your pg_hba.conf file. This file is found in
the etc directory of the PostgreSQL installation location.
You can either alter the pg_hba.conf file directly by opening it in a text editor, such
as Notepad, or you can alter the pg_hba.conf file through PgAdminIII.
1. Open PgAdminIII.
2. Connect to the PostgreSQL instance as the postgres super user.
3. Connect to the database.
4. Click Tools, point to Server Configuration, and click pg_hba.conf.
No matter which method you use, you will be adding an entry for client connections
to PostgreSQL.
For example, to allow any user who supplies a valid password to connect to a
database named habitat from any address beginning with 10.2.12 using an md5
connection, add the following line to the pg_hba.conf file:
host habitat all 10.2.12.0/24 md5
Note: The recommended authentication type to use with your ArcSDE database is
md5. For a description of this authentication method, consult the PostgreSQL
documentation at http://www.postgresql.org/docs/8.3/interactive/auth-
methods.html#AUTH-PASSWORD.
If you want to allow all users who supply a valid password to connect to any of the
databases on the PostgreSQL instance, you would add a line similar to the following
to the pg_hba.conf file:
host all all 10.2.12.0/24 md5
You'll notice the preceding examples were for IPV4 addresses. If you need to
configure the database cluster to accept connections from machines with an IPV6
address, the format would be as follows:
host all all fe60::61f9:1253:c522:9b92%10/128 md5
To allow any machines with an address beginning with fe60 connect, you would add
this line to the pg_hba.conf file:
host all all fe60::0000:0000:0000:0000%10/8 md5
If your PostgreSQL database cluster is set up on a machine that has an IPV6 address
and you want machines with an IPV4 address to connect to it, you need to
uncomment the following line in the pg_hba.conf file:

17
host all all ::1/128 md5
Details about the pg_hba.conf file can be found in the PostgreSQL documentation at
http://www.postgresql.org/docs/8.3/interactive/auth-pg-hba-conf.html.
Installation guide: ArcSDE for PostgreSQL
18
Installing the ArcSDE component
Follow the steps below to install the ArcSDE component of ArcGIS Server Enterprise
on Windows.
Preparing to install the ArcSDE component
1. Obtain an authorization file for the machine on which you will be installing the
ArcSDE component. This is not required to install the ArcSDE component but
is required to complete the postinstallation setup. See the topic To obtain an
authorization file.
2. Log into the computer where you will be installing the ArcSDE component as a
user with administrative privileges.
3. Close all applications on your computer.
4. Insert the ArcSDE component media into the appropriate drive and follow the
directions on How to install the ArcSDE component.
How to install the ArcSDE component
1. When the PostgreSQL installation completes, the ArcSDE component
installation will begin. If you already have a supported version of PostgreSQL
on the machine, the ArcSDE component installation will begin immediately.
2. During the installation, you will be asked to read the license agreement and
accept it or exit if you do not agree with the terms. The license agreement
dialog box contains a link to view the license agreement in another language.
3. To complete the software installation, follow the directions in the setup
program.
4. After the ArcSDE component installation completes, the setup program
provides the opportunity to begin the Post Installation wizard. The Post
Installation wizard provides the options to set up the geodatabase repository
in the database, create an ArcSDE administrative user, authorize the
software, and create and start the ArcSDE service. See the Postinstallation
overview for more information.
If you intend to use the PostGIS geometry type but have not yet installed
PostGIS, exit out of the Post Installation wizard and install PostGIS.
Note: If you intend to use ArcSDE with a pre-existing supported version of
PostgreSQL, you need to copy certain ArcSDE files to the PostgreSQL installation
folder. This is covered in the first bullet point on the topic Installing the DBMS and
the ArcSDE component on different machines.

19
Postinstallation
Postinstallation overview
Once the ArcSDE component is installed, you must set up your database, create an
ArcSDE geodatabase, authorize the geodatabase for use, and you can create an
ArcSDE service. The Post Installation wizard provides an easy way to complete these
tasks. The Post Installation wizard will guide you through the following options:
• Setting up the sde user environment—If you do not already have a
database to use for your geodatabase, an sde user and schema, and a
tablespace in which to store the database, the Post Installation wizard will
create them by connecting to PostgreSQL as the super user. The
database, tablespace, sde user, and schema must exist before the rest of
the postinstallation setup will succeed. Security at your site may dictate
you skip this part of the setup and allow your PostgreSQL database
administrator to manually create them. Once the database administrator
has created these objects for you, you can reopen the Post Installation
wizard from the start menu and skip the first step by selecting the custom
postinstallation setup option on the first dialog box of the Post Installation
wizard.
• Setting up the ArcSDE repository—This is a crucial step in the
postinstallation setup because it creates the ArcSDE geodatabase system
tables, stored procedures, and locators. If this step does not run
successfully, you will not be able to connect to the geodatabase.

This postinstallation option allows you to define the ArcSDE configuration
files to be used by ArcSDE in the database. If you modified a dbtune.sde,
dbinit.sde, or giomgr.defs file and want to use one or all of those, you will
have a chance to include them here. Accept the defaults if you do not
have any custom files to use.

Note: This step can be performed manually with the sdesetup command.
See the ArcSDE Administration Command References for details on using
sdesetup.
• Authorizing ArcGIS Server Enterprise—Each ArcSDE server requires a
unique authorization file. This postinstallation option authorizes your
geodatabase repository using the authorization file. The ArcSDE service
will not start and direct connections will be refused unless your
geodatabase repository has been configured using a valid authorization
file. You can reconfigure your geodatabase repository using the sdesetup
command with the update_key operation. See the ArcSDE Command
Reference for details on the use of the sdesetup command. You can access
the Command Reference from the Start menu: Start > All Programs >
ArcGIS > ArcSDE > Command References.
• Creating the ArcSDE service—Once the ArcSDE component has been
authorized for use, the ArcSDE service can be created. If the information
Installation guide: ArcSDE for PostgreSQL
20
provided to create the ArcSDE service is complete, the Post Installation
wizard will start the ArcSDE service for you.
Choose a Complete or a Custom postinstallation setup.
A Complete installation guides you through all of the postinstallation options.
Selecting a custom installation allows you to choose from any of the available
postinstallation options.

The Custom installation can be used if you need to run parts of the postinstallation
setup at different times or if you do not need to perform all the steps. In that case,
choose Custom and click Next. That takes you to the following dialog box:

21

Some scenarios for which you might run parts of the postinstallation setup at
different times include the following:
• If you need to request your authorization file, perform the first three steps
only. As part of the third step, you can request your authorization file. You
cannot complete the third step nor proceed with the fourth step until you
have the authorization file. Later, you can go back and complete the third
and fourth steps.
• If you or your database administrator already manually created the sde
user, schema, tablespace, and database, skip the first step.
• If you are upgrading the geodatabase, skip the first step.
• If you have an existing geodatabase but received a new authorization file,
run only the third step.
• If none of your users plan to utilize an ArcSDE service to connect to the
geodatabase, skip the fourth step.
If you need to run the Post Installation wizard again at a later time, it is available
from Start > Programs > ArcGIS > ArcSDE > ArcSDE for PostgreSQL Post
Installation.
Installation guide: ArcSDE for PostgreSQL
22


Setting up the sde user environment
This postinstallation setup option will do the following:
• Create the sde user.
• Grant the sde user super user privileges to complete the installation.
• Create the database to be used for the ArcSDE geodatabase.
• Create the sde user's default schema in the database.
• Create or designate a tablespace in which to store the database.
Note: If you installed PostGIS and plan to use its geometry type in your
geodatabase, you must skip this portion of the Post Installation wizard and
manually do the following:
1. Create the sde user in the database cluster.
2. Grant the user super user permissions.
3. Create the sde user's schema in the PostGIS database.
4. Grant USAGE to Public on the sde schema.
5. Grant SELECT, INSERT, UPDATE, and DELETE on the
public.geometry_columns table to the sde user.
Once you finish these manual steps, you can start the Post Installation wizard,
choose to use a Custom setup, and uncheck the option to define the sde user
environment. Proceed with the steps in Setting up the geodatabase repository.
To set up the database, sde user, schema, and tablespace, the Post Installation
wizard connects to PostgreSQL as the postgres super user. This is the user you
created when you installed PostgreSQL. You must provide the super user name and
password.

23

Note: If for some reason your super user's name is stored in mixed case or all
capital letters in the database, enclose the name in double quotes when you type it.
Once connected to PostgreSQL as the super user, you will be required to set a
password for the sde user. The user name must be sde and the schema created in
the database for this user will also be sde.
By default, the database name is also set to sde. You may change it to another name
as long as the name begins with a letter, is less than 32 characters, and is all lower
case.
You may also provide a tablespace name and assign a path to the tablespace file or
accept the default provided.
Note: PostgreSQL requires the tablespace be created in an empty directory. If you
specify a folder that already exists and contains any files, tablespace creation will
fail. Also note, you cannot specify a path to a remote directory for the tablespace.
Installation guide: ArcSDE for PostgreSQL
24

The sde database, tablespace, schema, and user will be created if necessary, and the
required super user privileges will be granted to the sde user to create the
geodatabase repository.
Note: After all postinstallation steps are complete, super user privileges can be
removed from the sde user. However, before you can upgrade your geodatabase,
these privileges must be regranted to the sde user. Be aware that if you grant these
privileges using PgAdminIII, you must also grant the sde user privileges to modify
the catalog directly. These permissions are included with super user privileges when
granted using psql, but are not included when granting super user privileges through
PgAdminIII.

Related concepts found in the help
You can get more information related to the sde user and permissions in the ArcGIS
Desktop online help (http://webhelp.esri.com/arcgisdesktop/9.3) or the help system
installed with ArcGIS Server or ArcGIS Desktop. Open the help and search for the
following titles:
The ArcSDE administrative account
User permissions


25

Setting up the geodatabase repository
Once the sde database, user, schema, and tablespace are created, you can set up
the ArcSDE geodatabase repository. Options are provided to specify custom
giomgr.defs*, dbinit.sde, and/or dbtune.sde files.
If you do not have custom files, accept the default configuration files.

*The giomgr.defs file contains a parameter—TEMP—that is used to specify the full path name to a temporary disk space directory used for
attribute binary large objects that exceed the size specified by the BLOBMEM parameter. This parameter is commented out. If left commented
out, the default location for this is the temporary folder of the user logged into the Windows machine at the time the geodatabase is created. If
that location is acceptable, you do not have to uncomment and change this parameter value. If not, alter the giomgr.defs file, uncommenting the
TEMP parameter and setting it to the full path name you want to use, then save the giomgr.defs file.

After the configuration files are defined, you can connect to PostgreSQL to set up the
geodatabase repository. Setting up the repository is a crucial step in the
postinstallation setup. If you do not choose to perform this postinstallation option
using the Post Installation wizard, you must manually execute the sdesetup
command at the DOS prompt.
The geodatabase repository contains all the ArcSDE metadata for administering the
ArcSDE geodatabase. Refer to the sdesetup command in the ArcSDE Administration
Command Reference (%SDEHOME%\Documentation\Admin_Cmd_Ref) for specifics
on what is occurring with this operation.
Provide your sde user password and database name to connect to PostgreSQL as the
sde user and create the repository.
Installation guide: ArcSDE for PostgreSQL
26


Related concepts found in the help
You can get more information related to setting up the repository in the ArcGIS
Desktop online help (http://webhelp.esri.com/arcgisdesktop/9.3) or the help system
installed with ArcGIS Server or ArcGIS Desktop. Open the help and search for the
following titles:
The dbtune file and the DBTUNE table
DBTUNE configuration keywords
DBTUNE configuration parameter name-configuration string pairs
About geometry storage types
A spatial type for PostgreSQL
The ST_Geometry storage type
Using the PostGIS geometry type
The giomgr.defs file and the SERVER_CONFIG table
The dbinit.sde file
System tables of a geodatabase in PostgreSQL


27

The ArcSDE component authorization
Each server on which the ArcSDE component is installed requires a unique
authorization file. You can obtain an authorization file using the Post Installation
wizard. If you have already obtained your authorization file, the Post Installation
wizard will configure your geodatabase repository using your authorization file.
Every ArcSDE geodatabase that resides on the same machine must be authorized
using the authorization file because the authorization information is stored in the
geodatabase repository. The ArcSDE service will not start nor will you be able to
make any direct connections to the geodatabase unless your geodatabase repository
has been configured using a valid authorization file.
To reconfigure the repository with an updated authorization file, run through this
portion of the Post Installation wizard again. To launch the Post Installation wizard at
a later time, go to Start > All Programs > ArcGIS > ArcSDE > ArcSDE for
PostgreSQL Post Installation. If the software authorization option is not selected with
the repository setup option, you will also be required to provide the following
information to connect to the geodatabase:

Provide your sde user password and database name to connect to PostgreSQL as the
sde user and register the database with ArcGIS Server Enterprise.
To successfully register and authorize ArcGIS Server Enterprise for this database:
Choose your registration option
Installation guide: ArcSDE for PostgreSQL
28

You can configure the geodatabase repository using two methods:
1. I have installed my software and need to register it.
2. Select this option if you do not already have an authorization file. There are
several methods to provide your registration information.

29

Select the registration method you would like to use. This is the method in
which you will provide your registration information, including the registration
number you received with the software. After providing your registration
information, your authorization file will be emailed to you.
Tip
• Register now using the Internet enables you to authorize
the software immediately. It requires an Internet
connection.

3. I have received an authorization file from ESRI and am now ready to
finish the registration process.
4. Select this option if you have already received your authorization file from
ESRI Customer Service. If you select this option, you can either browse to the
Installation guide: ArcSDE for PostgreSQL
30
location of the file (if you received the file by email), or you can manually
enter the authorization information.

If you choose the option to browse to an authorization file on disk, you are
required to Choose or enter the location of the authorization file that you
received from Customer Service.
If you choose the option to manually enter the authorization information, you
are required to provide the following information: (This information can be
obtained from the authorization file you received by mail, email, telephone, or
fax)
• Feature name
• Version number
• Time-out date
• Registration number
• Authorization code

31

Creating an ArcSDE service
This option of the Post Installation wizard allows you to create an ArcSDE service.
You must provide a unique TCP/IP port number and service name, the password that
you used for your SDE user, and the database name. By default, if you chose a
complete postinstallation setup, the database you specified during geodatabase
repository creation is specified. If you are doing a custom postinstallation, this field
will be populated with sde. Replace it with the name of your database.
All fields in this dialog box are required.

This portion of the Post Installation wizard will add an entry to the services file of
your server machine (usually, this is c:\WINNT\system32\drivers\etc\services) and
will register the service with Windows. If you need to modify your service later, you
can run through this option in the Post Installation wizard again, or you can use the
sdeservice command at the DOS prompt. Information on the sdeservice command
can be found in the ArcSDE Administration Command Reference
(%SDEHOME%\Documentation\Admin_Cmd_Ref).
Related concepts found in the help
You can get more information related to the ArcSDE service in the ArcGIS Desktop
online help (http://webhelp.esri.com/arcgisdesktop/9.3) or the help system installed
with ArcGIS Server or ArcGIS Desktop. Open the help and search for the following
titles:
An overview of ArcSDE geodatabase connections
Starting an ArcSDE service
Installation guide: ArcSDE for PostgreSQL
32
Stopping an ArcSDE service
Pausing and resuming an ArcSDE service
Accessing an ArcSDE service through a firewall
Troubleshooting the ArcSDE service


33
Uninstalling
Uninstalling the ArcSDE component
1. Before uninstalling, make a copy of any custom files (such as the dbtune.sde
file) you want to keep for future use.
2. Stop all ArcSDE services on the computer. This can be done using the
Windows Services menu or using the sdemon command.
3. From the Start menu, open the Control Panel and double-click the
Add/Remove Programs icon.
4. Select ArcSDE for PostgreSQL from the program list, and click the Remove
button.
5. If you no longer need or plan to re-create the existing ArcSDE services
associated with PostgreSQL, click Yes when asked to delete the services. If
you plan to keep the ArcSDE service for transition purposes, click No.
This removes the ArcSDE component from disk. The ArcSDE system tables, stored
procedures, and user data are still in your PostgreSQL database.

Uninstalling PostgreSQL from Windows
Note: If you are uninstalling PostgreSQL as a precursor to upgrading the PostgreSQL
or PostGIS products, be sure you have created backups of all your databases prior to
uninstallation and have moved the backup files to a secure location!
Before uninstalling your PostgreSQL software, you need to stop and delete any
ArcSDE services you have associated with PostgreSQL databases. If you don't, you
won't be able to uninstall PostgreSQL because the ArcSDE service will be using it.
Uninstalling the PostgreSQL software
You can uninstall PostgreSQL through the Windows Control Panel.
1. Open the Control Panel then open Add or Remove Programs.
2. Click on PostgreSQL in the Currently installed programs list and click Remove.
3. Click Yes to confirm the uninstallation of PostgreSQL.
Note: Uninstalling PostgreSQL does not uninstall PgAdminIII.
Cleaning up the PostgreSQL folders
After you have uninstalled the PostgreSQL software, you need to delete the
installation folder. (Make sure you didn't save your backup files to this folder if you
plan to reinstall PostgreSQL and restore your databases!)
1. Open Windows Explorer.
Installation guide: ArcSDE for PostgreSQL
34
2. Navigate to your PostgreSQL installation location. The default location is
\Program Files\PostgreSQL.
3. Delete the PostgreSQL folder.
4. If you installed any parts of PostgreSQL in other directories (such as
tablespaces, data files), you need to navigate to and manually delete these
directories as well.
Note: When you restore your databases or database cluster, you must re-
create your tablespaces prior to restore. Consult the PostgreSQL
documentation for information on tablespaces and restoring.


35







Installations on Linux
Installation guide: ArcSDE for PostgreSQL
36

System requirements
For the latest in supported system environments, see http://support.esri.com and
navigate to Software > ArcGIS Server > System Requirements.
Your computer is required to meet these minimum system requirements to install
ArcSDE for PostgreSQL.
PLATFORM
OPERATING SYSTEM
COMPILER
Red Hat
®

Linux
®

Red Hat Linux ES 4
gcc version 3.4.6 20060404 (Red Hat
Linux 3.4.6-8)
SUSE
®
Linux
SUSE Linux Enterprise
Server 10
gcc version 3.4.6 20060404
Higher releases may, and usually do, work. Lower versions of releases are not
supported.
Note: For any given operating system, if the DBMS is not supported on that version
of the operating system, ArcSDE is not supported either.


37


Installation overview for Linux
The steps to install PostgreSQL and ArcSDE for PostgreSQL on a Linux operating
system (OS) are summarized below. The user you log in as to run each step is in
bold.
For installations on Red Hat Linux, RPM files are provided on the ArcSDE component
installation media. For installations on SUSE Linux, you have to obtain the
installation files on your own.
1. Log in as root, create a directory to house the RPM files and copy the files
from the installation media to this directory.
2. As root, create an sde OS user.
3. Either:
a. If you are installing on Red Hat Linux, run the create_pgdb.sde script
as root to install PostgreSQL, set up the PostgreSQL database cluster,
create a postgres OS user, and copy the necessary library files.
or
b. Log in as root and manually install PostgreSQL, set up the database
cluster, create the postgres OS user, and copy the st_geometry.so,
libpe.so, and libsg.so files from the installation disk to the PostgreSQL
lib directory.
See Preinstallation setup and Installing PostgreSQL on Linux for instructions.
4. As the postgres user, set environment variables. See step 10 of the
Installing PostgreSQL on Linux topic for instructions on setting environment
variables.
5. As the postgres user, edit the pg_hba.conf and postgresql.conf files to
configure the PostgreSQL database cluster. For details on settings in
pg_hba.conf, see the section Configuring the database to accept connections
on the topic "Creating and configuring a PostgreSQL database". For
information on the postgresql.conf file, consult the PostgreSQL
documentation.
6. As the postgres user, start the PostgreSQL process.
7. Either:
a. If installing on Red Hat Linux, run the setup_pgdb.sde script as the
postgres user to create a tablespace, database, sde user, sde
schema, and PL/pgsql language.
or
Installation guide: ArcSDE for PostgreSQL
38
b. Log in as the postgres user and manually create the sde DBMS user,
tablespace, database, sde schema in the database, and PL/pgsql
language.
See Creating and configuring a PostgreSQL database for instructions.
8. As the sde user, set the sde environment variables. See Installing the
ArcSDE component for instructions.
9. As the sde user, run the ArcSDE installation. See Installing the ArcSDE
component for instructions.
10. As the sde user, edit the dbinit.sde file to include the name of the database.
11. As root, alter the services file in the etc directory to include the name and
port number for the ArcSDE service. See ArcSDE postinstallation setup for
instructions.
12. As the sde user, alter the services.sde file in the etc directory of the ArcSDE
installation location to also include the name and port number for the ArcSDE
service. Run the sdesetup -o install command to create the geodatabase and
authorize the ArcSDE component. See ArcSDE postinstallation setup for
instructions.
13. Run the sdemon -o start command as the sde user to start the ArcSDE
service. See Starting the ArcSDE service.

39
Installing and configuring PostgreSQL
Preinstallation setup
Before you install PostgreSQL, make sure your server meets the minimum system
requirements and that there is not a previous version of PostgreSQL already installed
on the server.
1. Check for previous versions of PostgreSQL on your machine by logging in as
the root user and issuing the following command:
rpm –qa | grep postgres
Note: If you had installed a previous version of PostgreSQL by compiling from
source files rather than using RPMs, this command will not show that a
previous installation exists; you will have to check for it manually.
If this command indicates an installation of any previous version of
PostgreSQL exists on your computer, you either have to remove it prior to
installing the release of PostgreSQL that ships with the ArcSDE component of
ArcGIS Server Enterprise, upgrade the existing instance, or install PostgreSQL
8.3.0 in another directory. If you choose to upgrade, be sure to create a
backup of the existing PostgreSQL instance. Consult the PostgreSQL
documentation at http://www.postgresql.org/docs/ for details. Be aware, the
Red Hat Linux installation comes with an older version of PostgreSQL by
default, so on the Red Hat operating system, it is likely you will have a
previous installation of PostgreSQL.
2. To remove a previous version of PostgreSQL from the machine, issue the
following command:
rpm –e <name_of_the_returned_package>
3. Be sure to remove the PostgreSQL installation directory as well.
If there is no 8.3.0 release of PostgreSQL on the server, proceed to the PostgreSQL
installation instructions. If there is an existing 8.3.0 release on the server (either you
upgraded an older existing instance or you already installed 8.3.0), proceed to the
instructions for creating and configuring the database to use with ArcSDE.

Installation guide: ArcSDE for PostgreSQL
40

Installing PostgreSQL on Linux
To install PostgreSQL 8.3.0 on SUSE Linux, you need to obtain the source files and
use those to install PostgreSQL. Source files can be obtained from the PostgreSQL
Web site.
Follow the steps below to install PostgreSQL 8.3.0 on Red Hat Linux.
How to install PostgreSQL
The Red Hat package manager (RPM) files for PostgreSQL 8.3.0 are provided to you
on the ArcSDE component installation media. These RPM files can be used for
installations on Red Hat 4 Linux.
The following steps explain how to manually install PostgreSQL on Red Hat Linux
using RPMs. If you run the create_pgdb.sde script provided on the
installation media to install , it will prompt you for information to complete
steps 1 through 9 of the PostgreSQL installation. Therefore, if you run the
script, the only step you need to manually perform is step 11.
If you are installing on SUSE Linux using source files, please follow the installation
instructions provided by PostgreSQL.
At a minimum, you must install the following packages to use PostgreSQL with
ArcSDE:
• postgresql-libs
• postgresql
• postgresql-server
Note: Additional RPMs are included on the installation media for other optional
components. The create_pgdb.sde script will prompt you to install either the
minimum (the files listed here plus postgresql-docs) or all of the components. If you
plan to also install and use PostGIS, you should install the postgresql-devel package
at this time.
To install PostgreSQL
1. Place the ArcSDE component installation media into the appropriate drive and
mount the drive.
2. Log in as the root user. Note: You must know the root password to install any
packages on a Linux based system.
3. Create a directory to house the RPMs.
mkdir /usr/postgres
4. Copy the RPMs from the drive to the new directory
cp -r /media/cdrom/linux/pg/pg /usr/postgres

41
5. Execute the RPM file to install PostgreSQL.
To install the PostgreSQL database cluster, you need to use, at a minimum,
three RPM files—postgresql-libs, postgresql-8.3.0, and postgresql-server—in the
order listed. The following examples show installing the three required RPMs
plus the documentation and developer RPMs:
rpm –ihv postresql-libs-8.3.0-1PGDG.rhel4.i686.rpm
rpm -ihv postgresql-8.3.0-1PGDG.rhel4.i686.rpm
rpm -ihv postgresql-server-8.3.0-1PGDG.rhel4.i686.rpm
rpm -ihv postgresql-docs-8.3.0-1PGDG.rhel4.i686.rpm
rpm -ihv postgresql-devel-8.3.0-1PGDG.rhel4.i686.rpm
6. When you execute the RPMs, an operating system (OS) user named postgres
is created. This user is created without a password. It is recommended you
create a password for the postgres user.
7. Before installing any packages, you need to point to an encryption key, which
is provided on the installation media. The encryption key provides you
assurance that the file you are downloading is indeed what it says it is. If the
key is not present, you will receive a warning message when installing
PostgreSQL.
8. Copy the following ArcSDE library files from the ArcSDE installation media to
the PostgreSQL lib directory:

st_geometry.so

libpe.so

libsg.so
9. Initialize the database cluster.
A database cluster is a collection of databases managed by a database server.
After the PostgreSQL database cluster is initialized, it contains two databases:
one named postgres and a template database, template1.
The PostgreSQL database cluster must be created in an empty directory by
the postgres user. If it is not, database cluster initialization will fail.
Log in as the postgres user and issue the following command to initialize the
database cluster, which creates all of the files in the PGDATA directory:
/usr/bin/initdb -D /var/lib/pgsql/data
Note: There are additional options you can specify with these commands,
such as to specify authentication method and to set the database cluster's
locale. Be sure to read the PostgreSQL documentation for a full list of options
for each command. Also note there is only error logging with the last
command in the preceding list.
Installation guide: ArcSDE for PostgreSQL
42
10. Log in as the postgres user and prepare a shell by defining the following
variables in the postgres user's shell file. This is either the .cshrc (C), .bashrc
(Bash) or .profile (Bourne) file, depending on which shell type is used. The
following examples are for a .bashrc and .profile shell.
PGDATA=/var/lib/pgsql/data
export PGDATA
PATH=$PATH:/usr/bin
export PATH
LD_LIBRARY_PATH=/usr/lib:/usr/lib/pgsql
export LD_LIBRARY_PATH
The syntax for adding these variables to the .profile or .bashrc files is as
follows:
<VARIABLE> = <value for variable>
export <VARIABLE>
The following is the syntax to add these variables to the .cshrc file:
setenv <VARIABLE> <variable_value>
WARNING: You must source the shell file after defining these variables.
11. If you are going to store the tablespace in a location other than the default,
create a directory to store the ArcSDE tablespace by issuing commands
similar to the following:
mkdir $PGDATA/sde
chown -R postgres $PGDATA/sde
In these examples, sde is the name of the directory.

That completes the base PostgreSQL installation. For further documentation on how
to install PostgreSQL with RPMs, please refer to
http://pgfoundry.org/docman/?group_id=1000048.
You should now proceed with Creating and configuring the PostgreSQL database.
If you are installing the ArcSDE component on a machine separate from the
PostgreSQL instance, be sure to read Installing the DBMS and the ArcSDE
component on different machines.

43

Creating and configuring a PostgreSQL database
After you install PostgreSQL, you must configure the database cluster, then create a
database, create a PostgreSQL database login named sde, and a schema named sde
owned by the sde login. You also need to install and configure an additional
component. You can use the setup_pgdb.sde script if you are installed on Red Hat
Linux. If you run the setup_pgdb.sde script, you only need to manually
perform step 1. For installations on SUSE Linux, manually perform all steps.
1. Configuring the database cluster
Connection information
PostgreSQL uses a configuration file—pg_hba.conf—to store connection
information. Before you alter this file, make a backup copy of it. Next, open
the pg_hba.conf file in a text editor and add the IP address of connecting
client machines and the client authentication method used.
Note: The recommended authentication type to use with your ArcSDE
database is md5. For a description of this authentication method, consult the
PostgreSQL documentation at
http://www.postgresql.org/docs/8.3/interactive/auth-methods.html#AUTH-
PASSWORD.
For example, to allow any user who supplies a valid password to connect to a
database named habitat from addresses beginning with 10.2.12 using an md5
connection, add the following line to the pg_hba.conf file:
host habitat all 10.2.12.0/24 md5
If you want to allow all users who supply a valid password to connect to any
of the databases on the PostgreSQL instance from addresses beginning with
100, you would add a line similar to the following to the pg_hba.conf file:
host all all 100.0.0.0/8 md5
You will notice the preceding examples were for IPV4 addresses. If you need
to configure the database cluster to accept connections from machines with
an IPV6 address, the format would be as follows:
host all all
fe60::61f9:1253:c522:9b92%10/128 md5
To allow any machines with an address beginning with fe60 connect, you
would add this line to the pg_hba.conf file:
host all all
fe60::0000:0000:0000:0000%10/8 md5
If your PostgreSQL database cluster is set up on a machine that has an IPV6
address and you want machines with an IPV4 address to connect to it, you
need to uncomment the following line in the pg_hba.conf file:
Installation guide: ArcSDE for PostgreSQL
44
host all all ::1/128 md5
Details about the pg_hba.conf file can be found in the PostgreSQL
documentation at http://www.postgresql.org/docs/8.3/interactive/auth-pg-
hba-conf.html.
Note: It is likely you will have to add the IP address of the local computer
before the ArcSDE service will start.
Postgresql.conf
The postgresql.conf file is used to set various parameters that affect the
database cluster, such as how and through which port connections are made
to PostgreSQL, how resources are used, how and where error logs are
created, and vacuuming parameter settings.
You need to set the listen_addresses parameter to indicate on what IP
addresses PostgreSQL should listen for client applications. You can enter a
comma-separated list of host names or IP addresses. Or you can set this
parameter to '*' to allow the server to listen on all available IP addresses.
For additional information on setting postgresql.conf parameters, consult the
PostgreSQL documentation.
Start PostgreSQL
Now that you have changed the pg_hba.conf file, start the postmaster
process.
/usr/bin/pg_ctl start
2. Creating the PostgreSQL database and sde user
The Linux installation of ArcSDE provides a script—setup_pgdb.sde—for
creating the PostgreSQL tablespace, database, sde user, and its schema on
Red Hat Linux. You can use the script provided on the installation media, or
manually perform this step. For more guidance on PostgreSQL installation,
please refer to the PostgreSQL documentation.
Note: Although PostgreSQL allows you to store object names that are mixed
case or upper case by doing such things as enclosing the name in quotes, you
cannot use these with ArcSDE.
a. Log into psql as the postgres super user and create the ArcSDE
administrative user. The user created must be named sde, but you can
choose whatever password you like.
psql
CREATE ROLE sde LOGIN PASSWORD <password> SUPERUSER
NOINHERIT CREATEDB;
b. If you want to store the database used for your ArcSDE geodatabase in
a tablespace different from the default (pg_default), create a new

45
tablespace in the directory you created in step 9 on Installing
PostgreSQL on Linux.
In the following example, a tablespace named sde1 is created in the
sde directory. The tablespace is owned by the sde user.
CREATE TABLESPACE sde1 OWNER sde LOCATION
'/var/lib/pgsql/data/sde';
Note: PostgreSQL requires the tablespace be created in an empty
directory. If you specify a directory that already contains any files,
tablespace creation will fail.
c. Next, create a database and grant the sde user full access to it. (Full
access is necessary for the sde user to create the geodatabase.) Also
grant usage privileges to public so other users can access the
database.
Note: If you intend to use the PostGIS geometry type for data
storage, you must create the database using the PostGIS template or
enable an existing database for PostGIS geometry after the fact using
a script provided by PostGIS.
In this example, the agency database is owned by the postgres super
user, uses UTF8 character encoding, and is stored in the sde1
tablespace.
CREATE DATABASE agency OWNER sde ENCODING 'UTF8'
TABLESPACE sde1;
GRANT ALL ON DATABASE agency TO sde;
d. Log into the database to create the sde user’s schema. This is the
schema in which all the ArcSDE geodatabase system tables will be
stored. The schema name must be sde. Grant the sde user full rights
to this schema.
\c agency
CREATE SCHEMA sde AUTHORIZATION sde;
GRANT ALL ON SCHEMA sde to sde;
Because other users have to access the objects in the sde schema,
grant public permission to access it.
GRANT USAGE ON SCHEMA sde TO public;
Note: If you are using the PostGIS geometry type, you must also
grant SELECT, INSERT, UPDATE, and DELETE privileges on the
public.geometry_columns table to sde.
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE
public.geometry_columns TO sde;
Installation guide: ArcSDE for PostgreSQL
46
Other users
A file is included with the ArcSDE component installation that contains SQL
statements for the creation of other users and their schemas. You can find
this file, roles_schemas_privileges.txt, in the tools directory of $SDEHOME
after you have installed the ArcSDE component.
3. Installing PL/pgSQL
Now that the database and sde user and schema exist, you can install the
PL/pgSQL language. This component is required for you to use the database
with ArcSDE.
a. Log into psql, connecting to your new database as the sde user.
psql agency sde
b. Execute the following command:
CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler
VALIDATOR plpgsqsl_validator;

47
Installing the ArcSDE component
1. Preparing to install the ArcSDE component
To install ArcSDE for PostgreSQL, you must create an ArcSDE account on the OS.
By convention, this account is named sde. The ArcSDE user must own all ArcSDE
system files and directories.
The following is a sample Linux configuration for the ArcSDE account using sde as
the name.
Login
name:
sde
User Id:
<Any unused user id>
Group Id:
<Any group id>
Home
Directory:

<home directory for user sde>
Default
Shell:
/bin/bash
a. Log in as root and create the ArcSDE user with the following command:
/usr/sbin/useradd sde
b. Log in as the newly created sde user and add the following to the sde
user’s .cshrc, .bashrc or .profile file, depending on which shell it will use.
By adding the lines below, all ArcSDE administration and utility software
programs can be located without specifying absolute paths. Application
programs will also be able to find the necessary program files located
within the ArcSDE installation directory.
The environment variables you should set are as follows:
SDEHOME <location of ArcSDE>
PATH $PATH:$SDEHOME/bin
LD_LIBRARY_PATH
$LD_LIBRARY_PATH:$SDEHOME/lib:<postgresql_location>/lib
For the Bourne and Bash shells, add variable definitions to the .profile or
.bashrc files respectively. Syntax is:
<VARIABLE> = <value for variable>
export <VARIABLE>
For the C shell, add variable definitions to the .cshrc file (or the
SDEHOME/etc/dbinit.sde file). Syntax is:
Installation guide: ArcSDE for PostgreSQL
48
setenv <VARIABLE> <variable_value>
Note: When the ArcSDE service is started, the giomgr process reads the
variable settings in the $SDEHOME/etc/dbinit.sde file. These variable
settings override the variables set by .cshrc, .profile, or .bashrc files. The
role of the dbinit.sde file is further explained in the help topic The
dbinit.sde file in the ArcGIS Server and Desktop help.
c. Make sure the sde account has write permissions to the installation
directory.
2. Installing the ArcSDE component
The ArcSDE component should be installed logged in as the sde user created
in the previous step.
a. Place the ArcSDE installation media into the appropriate drive and
mount the drive.
b. Change directories into the Linux directory on the installation disk.
c. To start the ArcSDE component installation, type the install command
at the operating system prompt:
# ./install -load
(Note: The usage for the install command is: install <-help | -load | -
remove | -verify >. To read more about the installation procedure,
type: ./install -help.)
Running the install command will start the command-driven dialog for
the ArcSDE component installation procedure. Default selections are
noted in brackets, [ ]. To obtain a list of options or online help, type '?'
at any prompt. You can quit the installation procedure at any time by
typing 'quit' or 'q'. To return to a previous question, type the caret,
'^'.
d. Before continuing with the installation, you will be asked to read the
license agreement and accept it or exit if you do not agree with the
terms. The default is set to "no" and you have to type "yes" to proceed
with the installation. The license agreement can be found under the
License folder at the root level of each CD or on the DVD under each
platform's install folder (ArcSDE/<platform>/License). The license
agreement also can be viewed in a different language at
http://www.esri.com/licenseagreement/. Please read the license
agreement file appropriate for your locale.
ESRI is willing to license the software to you only if
you accept and agree to the enclosed license agreement.
If you have read and agree with the terms in the
enclosed license agreement type 'yes' to continue the
installation process, if not press <return> or type 'no'
to exit installation process. [no]

49
Once the installation is complete, please continue with the
postinstallation setup.
Note: If you intend to use ArcSDE with a pre-existing supported
version of PostgreSQL, you need to copy certain ArcSDE files to the
PostgreSQL installation location. These files are listed in the first bullet
point on the topic Installing the DBMS and the ArcSDE component on
different machines.

Installation guide: ArcSDE for PostgreSQL
50
ArcSDE postinstallation setup
After the ArcSDE component is installed but before you attempt to start an ArcSDE
service, you must complete the postinstallation setup.
To successfully complete the postinstallation setup, follow these steps:
1. Modify files in $SDEHOME/etc and /etc/services.

You will need to modify one or more files:
• /etc/services—The services file in the etc directory is a system file to
which you'll need to add a line to define the TCP/IP port number and
name to use for your ArcSDE service. To change the services file
requires root access. Add a line similar to this one:
my_sde 5151/tcp # ArcSDE service on pinetree
Users connecting to your service can use the number 5151 as the service
name. If they prefer to use the name my_sde, they'll need to add this
same line to their system services file.
• $SDEHOME/etc/services.sde—Add the same line to this file that
you added to the /etc/services file. For more information, see The
services.sde file in the ArcGIS Server or Desktop help. (You can access
the ArcGIS Server help from the help directory in the ArcSDE install
location. Use the index.htm file to launch the help system.)
• $SDEHOME/etc/dbtune.sde—The dbtune file populates the DBTUNE
geodatabase system table with keywords, parameters, and values that
control the physical storage of tables in the database. For PostgreSQL
databases, it is important that you edit this file prior to running the
sdesetup command to designate in which tablespaces the database
should use to store certain system tables. For more information, see
the ArcGIS Server and Desktop help topic The dbtune file and the
DBTUNE table.
• Other configuration files in the $SDEHOME/etc directory you may want
to edit include:
dbinit.sde—You can set environment variables in this file that the
service will use each time it starts. The syntax for setting these
environment variables is as follows:
set <variablename>=<value>
You can set an environment variable called SDE_DATABASE in this
file, which will designate the name of the database to which the
ArcSDE service will connect. For example:
set SDE_DATABASE=mydb

51
Each geodatabase is self contained. That is, there is no cross-
database access of spatial data; once connected to a database, you
can only access spatial data in that database. If data from another
geodatabase is also needed, you will need a second connection to
that database. Each database will have its own set of ArcSDE and
geodatabase system tables and stored procedures. See Using
multiple geodatabases within a DBMS for information on how to
support multiple ArcSDE services for multiple geodatabases.
See the ArcGIS Server and Desktop help topic The dbinit.sde file
for more information on variables you can set in this file.

giomgr.defs—This file populates the sde_server_config ArcSDE
geodatabase system table with parameters that define how ArcSDE
will utilize memory. The default parameters are sufficient for most
applications. Edit with care.
For more information on this file, see the ArcGIS Server and
Desktop help topic The giomgr.defs file and the SERVER_CONFIG
system table. For a list of the parameters found in this file, see
ArcSDE initialization parameters.

2. Run $SDEHOME/bin/sdesetup.

The sde database user must be a super user to run sdesetup. This
privilege can be revoked after postinstallation is complete. Note: If
revoked, these privileges must be regranted to the sde user prior to a
geodatabase upgrade.

The sdesetup command will do the following:
• Create all the ArcSDE and geodatabase system tables in the
database.
• Create ArcSDE stored procedures.
• Populate the LOCATORS and METADATA system tables with
data from $SDEHOME/geocode/templates.
The sdesetup command must execute successfully to properly create your
geodatabase and for ArcSDE to function correctly.
The usage for the sdesetup command to setup a geodatabase in
PostgreSQL is as follows:
sdesetup -o install -d POSTGRESQL [-H <sde_directory>]
[-u <DB_Admin_user>] [-p <DB_Admin_password>]
[-D <database>] [-s <server_name>] [-N]
[-l <key>] [-q]
Where:
-o install Creates geodatabase system tables and procedures
Installation guide: ArcSDE for PostgreSQL
52
-d Underlying RDBMS used to store the geodatabase
-D Database name
-H The ArcSDE installation directory ($SDEHOME)
-l ArcSDE authorization key or location of file
-N No verification prompt given
-p DBMS DBA user password
-q Quiet
-s Data source name
-u DBMS DBA user name
For example:
sdesetup -o install -d POSTGRESQL -u sde -p no.peeking
-D agency -s myserver -l /usr/sde/server93_Ent.ecp -N
More information on the sdesetup command can be obtained from the
ArcSDE Administration Command Reference
($SDEHOME/documentation/Admin_Cmd_Ref).
To authorize the software, use the -l <key> with sdesetup -o install. To
authorize ArcSDE later, use the update_key operation. For additional
information, see ArcSDE authorization.

Related concepts found in the help
You can get more information related to setting up the repository in the
ArcGIS Desktop online help (http://webhelp.esri.com/arcgisdesktop/9.3)
or the help system installed with ArcGIS Server or ArcGIS Desktop. Open
the help and search for the following titles:
The dbtune file and the DBTUNE table
DBTUNE configuration keywords
DBTUNE configuration parameter name-configuration string pairs
The giomgr.defs file and the SERVER_CONFIG table
The dbinit.sde file
System tables of a geodatabase in PostgreSQL


53

ArcSDE component authorization
Each server machine on which the ArcSDE component is installed requires an
authorization file. Each new version of ArcSDE requires a new authorization file.
To authorize the ArcSDE component of ArcGIS Server for use, you must obtain an
authorization file from ESRI Customer Service (.ecp file). For more information on
obtaining an authorization file see: https://service.esri.com
Every ArcSDE geodatabase that resides on the same machine must be authorized
using the authorization file because the authorization information is stored in the
geodatabase repository. The ArcSDE service will not start nor will you be able to
make any direct connections to the geodatabase unless your geodatabase repository
has been configured using a valid authorization file.
You can register the ArcSDE component with an authorization file in two ways:
1. If you already have your authorization file, run the sdesetup command with
the install or upgrade operation and specify the authorization key information
with the -l option. See ArcSDE postinstallation setup.
2. If you don't yet have your authorization file, you can run the sdesetup
command with either the install or upgrade operation but without the -l
option. Then when you receive your authorization file from ESRI, run
sdesetup again using the update_key operation and the -l option.
3. The syntax for the sdesetup command with the update_key operation is as
follows:
sdesetup -o update_key -d POSTGRESQL
-l <key> [-u <DB_Admin_user>] [-p <DB_Admin_password>]
[-H <sde_directory>] [-D <database>] [-s datasource]
[-i <service>] [-N] [-q]
Where <key> is the authorization key information or the location of your
authorization file
For example:
sdesetup -o update_key -d POSTGRESQL -l /machine/keycode
-u sde -p sde
More information on the sdesetup command can be obtained from the ArcSDE
Administration Command Reference ($SDEHOME/documentation/Admin_Cmd_Ref).
Installation guide: ArcSDE for PostgreSQL
54

Starting an ArcSDE service on Linux
If clients will be making connections using an ArcSDE service, an ArcSDE service
must be started. Start the ArcSDE service by logging in as the ArcSDE administrator
(the sde user) and using the sdemon command.
sde on edsel > sdemon -o start -i <service_name>
Please enter ArcSDE DBA password: <enter your PostgreSQL sde
password here>
Once the service is accepting connections, it is ready for use.
If you encounter problems starting the service, consult the topic Troubleshooting the
ArcSDE service in the ArcGIS Server or Desktop help. This help topic is also available
from http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm.
For more information on the sdemon command, see the ArcSDE Administration
Command Reference ($SDEHOME/documentation/Admin_Cmd_Ref).
Note: You may need to add the local machine's IP address to the pg_hba.conf file
before the ArcSDE service will start.
Also note: If all of your client applications will connect to the geodatabase using
direct connections, you do not have to start an ArcSDE service.

Related concepts found in the help
You can get more information related to the ArcSDE service in the ArcGIS Desktop
online help (http://webhelp.esri.com/arcgisdesktop/9.3) or the help system installed
with ArcGIS Server or ArcGIS Desktop. Open the help and search for the following
titles:
An overview of ArcSDE geodatabase connections
Stopping an ArcSDE service
Pausing and resuming an ArcSDE service
Accessing an ArcSDE service through a firewall
Troubleshooting the ArcSDE service


55
Uninstalling
This topic provides steps for uninstalling the ArcSDE component of ArcGIS Server
and a PostgreSQL installation that was originally installed using RPM files. If you
installed PostgreSQL from source files, consult the PostgreSQL documentation for
uninstallation instructions.
Uninstalling the ArcSDE component
To remove the existing version of the ArcSDE component from the server, perform
the following steps:
1. Stop the service if one is running.
sdemon -o shutdown -i <service_name>
2. Use the operating system command to remove the software.
rm -r $SDEHOME
You may also want to remove the service entry from the /etc/services file.
These two steps stop the service and remove the ArcSDE component from disk. The
ArcSDE system tables, stored procedures, and user data are still in your PostgreSQL
database.

Uninstalling PostgreSQL from a Red Hat Linux box
Note: If you are uninstalling PostgreSQL as a precursor to upgrading the PostgreSQL
or PostGIS products, be sure you have created backups of all your databases prior to
uninstallation and moved the backup files to a secure location!
Before uninstalling your PostgreSQL software, you need to stop any ArcSDE services
you have associated with PostgreSQL databases. Use the sdemon command to do
this.
sdemon -o shutdown -i 5000
Note: If you had first uninstalled the ArcSDE component, this would already have
been done.
Uninstalling the PostgreSQL software
1. Open a command shell.
2. Stop the postgres process. For example:
/usr/bin/pg_ctl stop -D var/lib/pgsql/data
3. Execute the following command to see what RPMs were used for your installation.
Installation guide: ArcSDE for PostgreSQL
56
rpm -qa | grep -i postgres
Note: If you installed PostgreSQL from source code, this command will not return
any PostgreSQL RPMs. Consult the PostgreSQL documentation for information on
uninstalling software installed using source code.
4. Remove the RPMs returned with the previous command in reverse order of their
installation. That means you would remove them in the following order:
• postgresql-test
• postgresql-pltcl
• postgresql-plpython
• postgresql-plperl
• postgresql-server
• postgresql-devel
• postgresql-docs
• postgresql-libs
• postgresql-8.3.0
You may have all or only a few of these present. To remove the RPMs that are
present in the order indicated, log in as the root user and execute the following:
rpm -e <name_of_rpm>.rpm
Execute this for each PostgreSQL RPM present.
Cleaning up the PostgreSQL directories
After you have uninstalled the PostgreSQL software, you need to delete the
$PGDATA directory.


57







Installing the DBMS and ArcSDE on
different servers
Installation guide: ArcSDE for PostgreSQL
58

Installing the DBMS and the ArcSDE component on
different machines
If you install PostgreSQL on a computer separate from the ArcSDE component, there
are a few things you should know.
• You must have the st_geometry, projection engine, and geometry shared
library files (listed in the following table) in the PostgreSQL installation
directory on the PostgreSQL server.
Library name
OS-dependent file names
st_geometry
st_geometry.dll (Windows), st_geometry.so
(Linux)
Projection
Engine
pe.dll (Windows), libpe.so (Linux)
Geometry
sq.dll (Windows), libsg.so (Linux)
• Note: You must be logged in as root when you copy the st_geometry.so,
libpe.so, and libsg.so files to the PostgreSQL bin directory on Linux
because this directory is owned by root.
• There are various scenarios for ArcSDE and PostgreSQL being installed on
separate machines. The steps for each are slightly different. See Scenarios
for installing ArcSDE and PostgreSQL on separate machines for these
steps.
• If you execute the sdesetup command to create the geodatabase
repository, rather than run the Post Installation wizard on Windows, you
must copy or ftp certain libraries from the PostgreSQL lib directory to
SDEHOME > bin on the server where ArcSDE is installed so that the
ST_Geometry type can access them. For Linux, you need to run the RPM
after it is placed on the Linux server.
Files on Linux
Files on Windows
postgresql-libs-8.3.0-
1PGDG.rhel14.i686.rpm
comerr32.dll
gssapi32.dll
k5sprt32.dll

59
krb5_32.dll
libeay32.dll
libiconv2.dll
libintl3.dll
libpq.dll
ssleay32.dll
• The PostgreSQL instance must be configured to accept connections from
the computer on which ArcSDE is running. To do this, alter the
pg_hba.conf file.
1. Make a backup copy of your pg_hba.conf file.
2. Open the pg_hba.conf file in a text editor.
3. Add to the pg_hba.conf file a line similar to the following:
host gdb ALL 199.22.100.55/32 md5
This allows all users connecting from the TCP/IP address specified
to connect to a database named gdb on the PostgreSQL database
cluster.
The TCP/IP address is the address for the ArcSDE server. In this
case, the ArcSDE address is in IPV4 format. For an IPV6 address,
the entry would have the full IPV6 address followed by /128, as
shown in the following example:
host gdb all ss22::45b9:1132:d511:2b64%10/128 md5
If the ArcSDE server has an IPV4 address but the PostgreSQL
server uses an IPV6 address, in addition to adding the ArcSDE
server's IP address to the pg_hba.conf file, uncomment this line in
the file:
host all all ::1/128 md5
4. Save your changes and close the pg_hba.conf file.
5. Set the PGHOST and PGPORT environment variables in the
dbinit.sde file in SDEHOME on the server where the ArcSDE
component is installed. PGHOST is the name of the server on which
PostgreSQL is installed. PGPORT is the port number through which
the PostgreSQL postmaster process is listening.
For example:
set PGHOST = postgresprod
set PGPORT = 5432
• Details about the pg_hba.conf file and the options to specify can be found
in the PostgreSQL documentation at
http://www.postgresql.org/docs/8.3/interactive/auth-pg-hba-conf.html.
Installation guide: ArcSDE for PostgreSQL
60
• The installation file for PostgreSQL must be run on the computer where
you are installing the PostgreSQL instance; you cannot run it remotely
from another machine.


61

Scenarios for installing the ArcSDE component and
PostgreSQL on separate machines
There are four possible scenarios based on the operating system (OS) of the servers.
• Both servers have a Windows OS.
• Both servers have a Linux OS.
• The ArcSDE server has a Windows OS, the PostgreSQL server has a Linux
OS.
• The ArcSDE server has a Linux OS, the PostgreSQL server has a Windows
OS.
Both servers are running Windows
If you are installing both ArcSDE and PostgreSQL on a Windows OS, you can run the
installation executable first on the PostgreSQL server to install PostgreSQL then run
the executable on the ArcSDE server to install the ArcSDE component. You will
manually perform the database and postinstallation.
1. Make sure the ArcSDE server meets the requirements for the ArcSDE
component installation and the PostgreSQL server meets the requirements for
a PostgreSQL installation. This includes removing or upgrading any older
release of PostgreSQL on the PostgreSQL server.
2. Insert the installation DVD into the drive on the PostgreSQL server.
3. Run the executable for ArcSDE for PostgreSQL installation for Windows. Note:
You must be a Windows administrator on the server to install software.
4. When you get to the installation options dialog box, uncheck ArcSDE for
PostgreSQL and just install the PostgreSQL software on this server.
Installation guide: ArcSDE for PostgreSQL
62

Follow the instructions in the topic Installing PostgreSQL to complete the
PostgreSQL installation.
5. Remove the installation DVD from the PostgreSQL server's drive and insert it
into the drive on the ArcSDE server.
6. Run the ArcSDE for PostgreSQL on Windows installation again, this time
unchecking PostgreSQL on the installation options dialog box and just
installing the ArcSDE component. Note: You must be a Windows
administrator on the server to install software.

63

7. Do not proceed with the Post Installation wizard.
8. Copy the st_geometry.dll file from the SDEHOME\bin on the ArcSDE server to
the lib folder in PostgreSQL home on the database server.
9. Copy the pe.dll and sg.dll files from SDEHOME\bin on the ArcSDE server to
the bin folder in PostgreSQL home on the database server.
10. Copy the following files from the lib folder in PostgreSQL home to the
SDEHOME\bin on the ArcSDE server:
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv2.dll
libintl3.dll
libpq.dll
ssleay32.dll
11. Set the PGHOST and PGPORT environment variables in the dbinit.sde file in
SDEHOME\etc on the server where the ArcSDE component is installed.
PGHOST is the name of the server on which PostgreSQL is installed. PGPORT
is the port number through which the PostgreSQL postmaster process is
listening.
For example:
set PGHOST = postgresprod
Installation guide: ArcSDE for PostgreSQL
64
set PGPORT = 5432
12. Open the PostgreSQL pg_hba.conf file in a text editor and add connection
information to allow the ArcSDE server to connect to the database. See
Installing the DBMS and the ArcSDE component on different machines for
examples of entries in the pg_hba.conf file.
13. Create a role named sde in the PostgreSQL database cluster using either psql
or one of the PostgreSQL administration tools, such as pgAdminIII. Grant it
super user permissions. If granting through pgAdminIII, also grant privilege
to modify catalog directly. (This is needed to complete step 11. Super user
permissions can be revoked after installation is complete as long as
CREATEDB permission is granted to the sde user.)
14. Create a database in the PostgreSQL database cluster using either psql or one
of the PostgreSQL administration tools, such as pgAdminIII. Make the super
user the owner of the database. Note: If you will be using the PostGIS
geometry type, be sure the database is created from the PostGIS template.
15. Create a schema named sde in your newly created database. Make the sde
user the owner of the schema, and grant USAGE on the schema to public.
16. Run the sdesetup command as the sde user to create the ArcSDE
geodatabase repository and to authorize the software.
sdesetup -o install -d POSTGRESQL -s <DBMS_server_name>
-D <database_name> -l <authorization_key> -u sde
17. Add the name and port number for the ArcSDE service to the Windows
services file and the ArcSDE services.sde file. Note: You must be an
administrator on the machine to alter the Windows services file.
18. Run the sdeservice command with the create and register operations to
create an ArcSDE service and register the database.
sdeservice -o create -d POSTGRESQL,<postgresql_instance>
-i <ArcSDE_service_name> -s <DBMS_server_name>
-p <sde_user_password>
sdeservice -o register -r ADMIN_DATABASE -v <database_name>
-i <ArcSDE_service_name> -d POSTGRESQL
19. Run sdemon to start the service.
sdemon -o start -i <ArcSDE_service_port_number>
For details on using the preceding commands, consult the ArcSDE Administration
Command Reference that is installed with the ArcSDE component.

Both servers are running Linux
If you are installing both ArcSDE and PostgreSQL on a Linux OS, installation will be
nearly the same as when both are installed on the same server; the only differences
being you will only create an sde OS user on the ArcSDE server and a postgres OS

65
user on the PostgreSQL server, and you will need to specify the -s option when
running sdesetup.
1. Make sure the ArcSDE server meets the requirements for the ArcSDE
component installation and the PostgreSQL server meets the requirements for
a PostgreSQL installation. This includes making sure an older version of
PostgreSQL does not already exist on the PostgreSQL server. See
Preinstallation setup for details.
2. Place the ArcSDE component installation media into the appropriate drive of
the PostgreSQL server and mount the drive.
3. As root, run the create_pgdb.sde script provided on the installation media
plus perform steps 10 and 11 on Installing PostgreSQL on Linux, or follow all
the instructions on the same topic to manually install PostgreSQL.
4. As the postgres user, run the setup_pgdb.sde script and perform steps 1 and
2 on Creating and configuring a PostgreSQL database, or manually perform all
the steps on the same topic.
5. Open the PostgreSQL pg_hba.conf file in a text editor and add connection
information to allow the ArcSDE server to connect to the database. See
Installing the DBMS and the ArcSDE component on different machines for
examples of entries in the pg_hba.conf file.
6. Place the ArcSDE component installation media into the appropriate drive of
the ArcSDE server and mount the drive.
7. Follow the instructions in Installing the ArcSDE component to setup the
ArcSDE server and install ArcSDE.
8. As the root user, ftp the st_geometry.so, libpe.so, and libsg.so files from
SDEHOME/bin directory on the ArcSDE server to the bin directory in the
PostgreSQL installation location on the PostgreSQL server.
9. As root, install the postgresql-libs-8.3.0-1.rhel4.i686.rpm on the ArcSDE
server to get the PostgreSQL libraries to which ArcSDE needs to have access.
10. Set the PGHOST and PGPORT environment variables in the dbinit.sde file in
the SDEHOME/etc directory on the server where the ArcSDE component is
installed. PGHOST is the name of the server on which PostgreSQL is installed.
PGPORT is the port number through which the PostgreSQL postmaster
process is listening.
For example:
set PGHOST = postgresprod
set PGPORT = 5432
11. Complete step 1 as instructed in ArcSDE postinstallation setup on Linux. For
step 2 on the same topic, be sure you provide the -s option with the
PostgreSQL server name. For example:
sdesetup -o install -d postgresql -u sde -s pgserver
-D arcsdegdb -l arcsdeserver,93,ecp123456,none,ABCDEF
Installation guide: ArcSDE for PostgreSQL
66
12. Start the ArcSDE service by following the instructions on Starting the ArcSDE
service on Linux.

ArcSDE is installed on a Windows server and PostgreSQL is
installed on a Linux server.
If you are installing ArcSDE on a Windows OS but the PostgreSQL database cluster
will be installed on a Linux OS, you can run the scripts on the PostgreSQL server to
install PostgreSQL and set up the database, then run the executable on the ArcSDE
server to install the ArcSDE component. You will manually perform the
postinstallation set up from the ArcSDE server.
When your ArcSDE component is installed on a server with a different OS than your
PostgreSQL database is, you have to be sure the files you copy or ftp to the
PostgreSQL installation location are designed to run on the OS of the PostgreSQL