Installing PostgreSQL on a Windows server and ArcSDE on a Linux server

If you are installing ArcSDE on a server with a Linux operating system (OS), but you are installing the PostgreSQL database cluster on a server with a Windows OS, you can run the executable on the PostgreSQL server to install PostgreSQL. You can also use the Custom option of the Post Installation wizard to create the tablespace, database, sde user, and sde schema, or you can manually perform these steps. Then, on the ArcSDE server, install ArcSDE and manually perform the postinstallation steps to create the geodatabase and authorize it.

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 transfer using FTP to the PostgreSQL installation location are designed to run on the OS of the PostgreSQL server. For this scenario, that means you must temporarily install the Windows version of ArcSDE for PostgreSQL on the PostgreSQL server to get the st_geometry.dll file from SDEHOME, copy it to the PostgreSQL installation location, then uninstall ArcSDE.

You also need to get the Linux version of the PostgreSQL files that ArcSDE needs. You can install the postgresql-libs-8.3.8-1.rhel5.rpm on the ArcSDE server to get the PostgreSQL libraries.

Steps:
  1. Make sure the ArcSDE server meets the requirements for ArcSDE 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.
  2. Access the installation files on the PostgreSQL server.
    • If you have a DVD, place it in the appropriate drive.
    • If you have an ISO image, use an ISO extractor to access the files.
  3. Run the executable for ArcSDE for PostgreSQL installation for Windows.
  4. You must temporarily install ArcSDE on the PostgreSQL server to get the ArcSDE library files you need. Therefore, when you get to the Installation Options dialog box of the installation wizard, keep both the ArcSDE for PostgreSQL and the PostgreSQL options checked and install both.

    See Installing PostgreSQL on Windows and Installing ArcSDE for PostgreSQL on Windows for instructions on using the wizard to install these.

  5. The Post Installation wizard starts after ArcSDE is installed. When the Post Installation Welcome dialog box appears, choose a Custom setup and click Next.
  6. Uncheck all but the first option (Define SDE user environment) on the ArcSDE Setup Wizard Option dialog box and click Next.
  7. Provide the PostgreSQL super user's name and password and click Next.
  8. Provide a password for the sde user, a name for the tablespace in which the database will be created, the name of the database, and the path to and name of the folder in which the tablespace will be created, then click Next.
    CautionCaution:

    Be sure the folder in which you create the tablespace is empty, or tablespace creation will fail.

  9. Open Windows Explorer and navigate to the bin folder of SDEHOME.

    SDEHOME is the pgexe directory in the ArcSDE installation location.

  10. Copy the st_geometry.dll file from this location and paste it into the lib folder of the PostgreSQL installation location.

    If you used the default location, this is c:\Program Files\PostgreSQL\8.3\lib.

  11. Uninstall ArcSDE from the PostgreSQL server.
    1. Open the Windows Control Panel.
    2. Open Add or Remove Programs (Windows Server 2003) or Programs and Features (Windows Server 2008).
    3. Choose ArcSDE for PostgreSQL from the list and click Remove (Windows Server 2003) or Uninstall/Change (Windows Server 2008).
  12. Access the ArcSDE installation files on the ArcSDE server.
  13. Follow the instructions in Installing ArcSDE for PostgreSQL on Linux to install ArcSDE.
  14. Set the PGHOST and PGPORT environment variables in the dbinit.sde file in the SDEHOME/etc directory on the server where ArcSDE 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. See The dbinit.sde file for information on setting variables in this file.

  15. Set the PGPORT variable in the dbinit.sde file.

    set PGPORT=9999

  16. On the PostgreSQL server, 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 Configuring a PostgreSQL database cluster on Windows to accept client connections.
  17. As the root user, install the postgresql-libs-8.3.8-1.rhel5.rpm on the ArcSDE server to get the PostgreSQL libraries to which ArcSDE needs to have access. See Installing PostgreSQL on Linux for more information.
  18. If you will be using an ArcSDE service to make connections to the geodatabase, open the services file found in the system etc directory in a text editor.
    NoteNote:

    Changing the services file requires root access.

  19. Add a line to the services file to define the TCP/IP port number and name to use for your ArcSDE service.

    Add a line similar to the following to the services file:

    esri_sde    5151/tcp    #ArcSDE on pinetree

    NoteNote:

    Users connecting to your service can use the port number (5151, in this example) to connect. If they prefer to use the name (esri_sde, in this example) to connect, they must add this same line to their system services file.

  20. If you will use an ArcSDE service, open the $SDEHOME/etc/services.sde file in a text editor and add the same line that you added to the /etc/services file.
  21. Run the sdesetup command to create a geodatabase. Be sure you provide the –s option with the PostgreSQL server name.
    sdesetup -o install -d POSTGRESQL 
    -u sde -s pgserver -D arcsdegdb
    -l arcsdeserver,93,ecp123456,none,ABCDEF
    

    Including the -l option in the sdesetup statement authorizes your geodatabase for use. If you do not include this option when you run this command, you must run the sdesetup command with the update_key operation to authorize the geodatabase.

  22. Follow the instructions in Authorizing ArcSDE geodatabases in PostgreSQL on Linux.
  23. If you are using an ArcSDE service, start it by following the instructions in Starting a local ArcSDE service on Linux or UNIX or Starting a remote ArcSDE service on Linux or UNIX.
  24. You can uninstall PostgreSQL from the ArcSDE server and delete the PostgreSQL files.

8/19/2013