Installing PostGIS

The following table lists the latest PostGIS versions and their corresponding Advanced Server versions.

The PostGIS version required by your Advanced Server installation is version-specific, but the documented and supported functionality of each version is the same. The information in this guide applies to each version listed in the table below.

PostGIS Version

Supported Advanced Server Versions

PostGIS 3.0.1

Advanced Server 12

PostGIS 2.5.4

Advanced Server 11 and 12

PostGIS 2.5.3

Advanced Server 12

PostGIS 2.5.1

Advanced Server 11

PostGIS 2.4.6

Advanced Server 9.6, 10 and 11

PostGIS 2.3.8

Advanced Server 9.6 and 10

PostGIS 2.1.9

Advanced Server 9.5

To view a complete list of EnterpriseDB supported platforms, visit the EnterpriseDB website.

Using an RPM Package to Install PostGIS

You must install Advanced Server before installing PostGIS. For details about installing and configuring Advanced Server, see the EDB Postgres Advanced Server Installation Guide. If you have previously used an RPM package to install Advanced Server, you have probably already created the repository configuration file and have EnterpriseDB credentials. If that is the case, you can simply install PostGIS with the command:

yum -y install edb-as<xx>-postgis-<y.y.y>

Where <xx> is the Advanced Server version and <y.y.y> is the PostGIS version you want to install. For example, to install PostgGIS 3.0.1 for Advanced Server 12, execute the following command:

yum -y install edb-as12-postgis-3.0.1

If you have removed your EnterpriseDB repository configuration file, you can use the steps in the following section to recreate it.

Creating a Repository Configuration File

The following steps provide detailed information about adding a repository configuration file to your system and installing PostGIS from an RPM package.

  1. Use the following command to create the repository configuration file:

    yum -y install https://yum.enterprisedb.com/edb-repo-rpms/edb-repo-latest.noarch.rpm
    
  2. The repository configuration file is named edb.repo; the file resides in /etc/yum.repos.d. Use your choice of editor to ensure that the value of the enabled parameter is 1, and replace the <username> and <password> placeholders in the baseurl specification with the name and password of a registered EnterpriseDB user.

    [edb]
    name=EnterpriseDB RPMs $releasever - $basearch
    baseurl=https://<username>:<password>@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
    

If you need EnterpriseDB credentials, visit the EnterpriseDB website.

  1. After saving your changes to the configuration file, you can use the yum install command to install PostGIS:

    yum install edb-as<xx>-postgis-<y.y.y>
    

    Where <xx> is the Advanced Server version and <y.y.y> is the PostGIS version you want to install.

    For example, to install PostGIS 3.0.1 on Advanced Server 12, execute the following command:

    yum install edb-as12-postgis-3.0.1
    

    When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter y and press Return to continue.

    The edb-as<xx>-postgis-<y.y.y> package installs the following PostGIS component packages:

    edb-as<xx>-postgis-<y.y.y>
    edb-as<xx>-postgis-utils
    edb-as<xx>-postgis-docs
    edb-as<xx>-postgis-core
    edb-as<xx>-postgis-jdbc
    

    After installing PostGIS with a package manager, please note that you must manually create a template database and the required PostGIS extension.

Using StackBuilder Plus to Install PostGIS

You must install Advanced Server before installing PostGIS. If you have used the graphical Setup wizard to install Advanced Server, you can use StackBuilder Plus to add PostGIS to your installation. For details about using the graphical installer to install and configure Advanced Server, see the EDB Postgres Advanced Server Installation Guide for Windows.

  1. Open StackBuilder Plus and select your Advanced Server installation from the drop-down list on the Welcome window. Click Next to continue to the application selection page.

welcome_stackbuilder.png

The StackBuilder Plus Welcome window

  1. Expand the Spatial Extensions node, and check the box next to the PostGIS version. Click Next to continue.

  2. The selected packages and the default download directory where the package will be installed are displayed; change the locations if required. Click Next.

  3. Once you have downloaded the installation files, a confirmation message is displayed. Click Next to start the PostGIS installation.

installing_postgis.png

installing_postgis.png

  1. Select an installation language and click OK.

language_selection.png

The language selection window

  1. The PostGIS welcome screen is displayed. Click Next.

postgis_welcome.png

The Postgis welcome window

  1. Use the Installation Directory field to specify the directory in which you wish to install the PostGIS software. Click Next to continue.

postgis_installation_directory.png

The Installation Directory window

  1. Use fields on the EDB Postgres Advanced Server Installation Details window to provide connection information for the Advanced Server host:

  • Use the Host field to identify the system on which Advanced Server resides.

  • Provide the name of the role that PostGIS will use for connections to the server in the User Name field.

  • Provide the password associated with the role in the Password field.

  • Use the Port field to identify the listener port that Advanced Server monitors for client connections.

Then, click Next to continue.

advanced_server_installation_details.png

The Advanced Server installation details window

  1. The Ready to Install window notifies you when the installer has all of the information needed to install PostGIS on your system. Click Next.

ready_to_install.png

The ready to install window

  1. Progress bars inform you as the installation progresses; click Finish to exit the installer when the PostGIS installation completes.

installattion_complete.png

The installation is complete

StackBuilder Plus will install PostGIS, and create the template_postgis database and PostGIS functions.