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

If you are installing ArcSDE on a server with a Windows operating system (OS), but the PostgreSQL database cluster is installed on a server with a Linux OS, install PostgreSQL and set up the database on the Linux server, then run the executable on the ArcSDE server to install ArcSDE. Then, manually perform the postinstallation setup of the geodatabase from the ArcSDE server.

When ArcSDE is installed on a server with a different OS than your PostgreSQL database, 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 use FTP to transfer the st_geometry.so and, if using ST_Raster, the libst_raster_pg_so files from the ArcSDE installation media to the PostgreSQL computer.

Similarly, the PostgreSQL files needed by ArcSDE need to be for Windows. To get these files, you must temporarily install PostgreSQL on the Windows server.

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. Log in as the root user.
  3. Access the ArcSDE installation files on the PostgreSQL server.
    • If you have a DVD, place it in the appropriate drive and mount the drive.
    • If you downloaded an ISO image, create a directory for the image and mount the image.

    The following are examples of creating a directory and mounting an image:

    mkdir /mnt/iso

    mount -o loop /mydir/downloads/ArcSDE10_UNIX_123456.iso /mnt/iso

  4. Change directories to the location of the image or the DVD drive.
  5. Install the RPMs provided on the installation media.
  6. Log in as the postgres user and prepare a shell by defining the following variables in the postgres user's shell file.

    The create_pgdb.sde script will set the first variable. You must set the path variables manually.

    The following examples are for a .bashrc and .bash_profile shell and show the default locations.

    PGDATA=/var/lib/pgsql/data
    export PGDATA

    PATH=$PATH:/usr/bin
    export PATH

    For 32-bit servers:

    LD_LIBRARY_PATH=/usr/lib
    export LD_LIBRARY_PATH

    For 64-bit servers:

    LD_LIBRARY_PATH=/usr/lib64
    export LD_LIBRARY_PATH

    NoteNote:

    You must source the shell file after defining these variables.

  7. 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 the preceding examples, sde is the name of the directory.

  8. As the postgres user, run the setup_pgdb.sde script.
  9. Configure the PostgreSQL database cluster to accept client connections. See Configuring a PostgreSQL database cluster on Linux to accept client connections for instructions.
  10. Transfer the st_geometry.so and, if you are using ST_Raster, the libst_raster.so files using FTP from the installation media to the usr/lib/pgsql directory on 32-bit servers or the usr/lib64/pgsql directory on 64-bit servers in the PostgreSQL installation location.
  11. Either remove the installation DVD from the PostgreSQL server's drive and insert it into the drive on the ArcSDE server or move the ISO image from the PostgreSQL server to the ArcSDE server.
  12. Run the executable for ArcSDE for PostgreSQL installation for Windows.
    NoteNote:

    You must be a Windows administrator on the server to install software.

  13. Since you need to get the Windows versions of the PostgreSQL libraries to copy to SDEHOME, go ahead and install both PostgreSQL and the ArcSDE when you get to the Installation Options dialog box of the installation wizard.
  14. Follow the instructions in Installing PostgreSQL on Windows and Installing ArcSDE for PostgreSQL on Windows to install PostgreSQL and ArcSDE on the ArcSDE server.
  15. After ArcSDE is installed, do not proceed with the Post Installation setup wizard.
  16. Navigate to the bin folder in the PostgreSQL installation location on the ArcSDE (Windows) server.
  17. Copy the following files from the PostgreSQL installation location to the SDEHOME\bin folder: comerr32.dll, gssapi32.dll, k5sprt32.dll, krb5_32.dll, libeay32.dll, libiconv2.dll, libintl3.dll, libpq.dll, and ssleay32.dll.
  18. Uninstall PostgreSQL from the ArcSDE 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 PostgreSQL 8.3.8 from the list and click Remove (Windows Server 2003) or Uninstall/Change (Windows Server 2008).
    4. Navigate to the PostgreSQL installation location and delete the files.
  19. 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.

  20. From a Microsoft DOS prompt on the ArcSDE server, run the sdesetup command as the sde database 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
    
  21. If you will be using an ArcSDE service, add the name and port number for the ArcSDE service to the Windows services file and the ArcSDE services.sde file.
    NoteNote:

    You must be an administrator on the server to alter the Windows services file.

  22. If you plan to use an ArcSDE service to connect to the geodatabase, see Creating an ArcSDE service from a remote Windows server.
  23. Run the sdemon command to start the service if you are using one.
    sdemon -o start -i <ArcSDE_service_port_number>
    

See the ArcSDE Administration Command Reference provided with ArcGIS Server Enterprise for details on using the sdesetup, sdeservice, and sdemon commands.


8/19/2013