Installing ArcSDE and PostgreSQL on separate Linux servers

If you are installing both ArcSDE and PostgreSQL on separate servers that both have a Linux operating system (OS), installation is almost the same as when both are installed on the same server, the only differences being that you create an sde OS user on the ArcSDE server and a postgres OS user on the PostgreSQL server, and you must specify the –s option when running sdesetup.

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

    LD_LIBRARY_PATH=/usr/lib
    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. Place the ArcSDE installation media into the appropriate drive of the ArcSDE server and mount the drive.
  11. Follow the instructions in Installing ArcSDE for PostgreSQL on Linux to install ArcSDE.
  12. As the root user, use ftp to transfer the st_geometry.so and (optionally) libst_raster_pg.so files from the $SDEHOME/bin directory on the ArcSDE server 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 on the PostgreSQL server.
  13. As the root user, install the postgresql-libs-8.3.8-1PGDG.rhel5 rpm on the ArcSDE server to get the PostgreSQL libraries to which ArcSDE needs to have access.
  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. 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.

  16. 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.

  17. 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.
  18. 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.

  19. Follow the instructions in Authorizing ArcSDE geodatabases in PostgreSQL on Linux.
  20. 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.

8/19/2013