Installing PostgreSQL on Linux

The Red Hat package manager (RPM) files for PostgreSQL 8.3.8 are provided to you on the ArcSDE component installation media. These RPM files can be used for installations on Red Hat 5 Linux.

The following steps explain how to install PostgreSQL on Red Hat Linux using the RPMs provided on the ArcGIS Server media.

At a minimum, you must install the following packages to use PostgreSQL with ArcSDE on Red Hat Linux:

Additional RPMs, such as postgresql-docs-8.3.8-1PGDG.rhel5, are included on the installation media for other optional components. For example, if you want to use the native PostgreSQL GUID type, you must also install the postgresql-contrib-8.3.8-1PGDG.rhel5 package.

NoteNote:

This package has a dependency on a third-party UUID package, which is not on the ArcGIS Server installation media.

You must also have the libXML2 library installed. This is installed by default on Red Hat Linux 5. Be sure you have at least version 2.6.23 of libXML2 installed. If not, you must download and install it on your operating system. LibXML2 is also required on SUSE Linux operating systems.

To install PostgreSQL 8.3.8 on SUSE Linux, you need to obtain the source files from the PostgreSQL Web site or the one-click installer from Enterprise DB, and use those to install PostgreSQL. Follow the instructions provided by PostgreSQL.

If you plan to also install and use PostGIS, you must install it from source. To do this, you must also install the postgresql-devel-8.3.8-1PGDG.rhel5 package.

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. 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.
  3. Log in as the root user.
  4. 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

  5. Change directories to the location of the image or the DVD drive.
  6. You can use the create_pgdb.sde script provided with the ArcSDE installation media to complete steps 6 and 7, and part of step 8.
  7. Install the RPMs provided on the installation media.
  8. Use FTP to move the st_geometry.so and, if you want to use the ST_Raster type, libst_raster_pg.so files from the ArcSDE installation media to the usr/lib/pgsql directory on 32-bit servers or the usr/lib64/pgsql directory on 64-bit servers.
    NoteNote:

    You must be logged in as the root user when you copy the st_geometry.so and libst_raster_pg.so files to the PostgreSQL lib directory, because the directory is owned by the root user.

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

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

Now configure the database cluster to accept client connections, create a database and sde user, and install the PL/pgSQL package. See Configuring a PostgreSQL database cluster on Linux to accept client connections, The postgresql.conf file, Creating a PostgreSQL database and sde user on Linux, and Installing PL/pgSQL on Linux.

Related Topics


8/19/2013