Using a Package Manager to Install Advanced Server v12

You can use the dnf or yum package manager to install Advanced Server or Advanced Server supporting components. dnf or yum will attempt to satisfy package dependencies as it installs a package, but requires access to the Advanced Server repositories. If your system does not have access to a repository via the Internet, you can use RPM to install an individual package or create a local repository, but you may be required to manually satisfy package dependencies.

You can list the dependencies of a package by running the following command:

  • On Fedora | RHEL | CentOS | Rocky Linux | AlmaLinux: repoquery --requires --resolve <package_name>
  • On Debian | Ubuntu: apt-cache depends <package_name>
  • On SLES: zypper search --requires --verbose <package_name>

Where, package_name is the name of the package that you want to install.

Installing the server package creates a database superuser named enterprisedb. The user is assigned a user ID (UID) and a group ID (GID) of 26. The user has no default password; use the passwd command to assign a password for the user. The default shell for the user is bash, and the user's home directory is /var/lib/edb/as12.

By default, Advanced Server logging is configured to write files to the log subdirectory of the data directory, rotating the files each day and retaining one week of log entries. You can customize the logging behavior of the server by modifying the postgresql.conf file. For more information about Modifying the postgresql.conf File, see the EDB Postgres Advanced Server Guide available at:

https://www.enterprisedb.com/docs

The RPM installers place Advanced Server components in the directories listed in the table below:

ComponentLocation
Executables/usr/edb/as12/bin
Libraries/usr/edb/as12/lib
Cluster configuration files/etc/edb/as12
Documentation/usr/edb/as12/share/doc
Contrib/usr/edb/as12/share/contrib
Data/var/lib/edb/as12/data
Logs/var/log/as12
Lock files/var/lock/as12
Log rotation file/etc/logrotate.d/as12
Sudo configuration file/etc/sudoers.d/as12
Binary to access VIP without sudo/usr/edb/as12/bin/secure
Backup area/var/lib/edb/as12/backups
Templates/usr/edb/as12/share
Procedural Languages/usr/edb/as12/lib or /usr/edb/as12/lib64
Development Headers/usr/edb/as12/include
Shared data/usr/edb/as12/share
Regression tests/usr/edb/as12/lib/pgxs/src/test/regress
SGML Documentation/usr/edb/as12/share/doc

Installation Pre-requisites

Before using an RPM package to install Advanced Server on a Linux host, you must:

Install Linux-specific Software

You must install xterm, konsole, or gnome-terminal before executing any console-based program installed by EnterpriseDB installers.

Install Migration Toolkit or EDB*Plus Installation Prerequisites (Optional)

Before using an RPM to install Migration Toolkit or EDB*Plus, you must first install Java version 1.7 or later for Migration Toolkit and Java version 1.8 or later for EDB*Plus. On a Linux system, you can use the dnf or yum package manager to install Java. Open a terminal window, assume superuser privileges, and enter:

  • On RHEL or CentOS 7:

    # yum -y install java
  • On RHEL or Rocky Linux or AlmaLinux 8:

    # dnf -y install java

Follow the onscreen instructions to complete the installation.

Request Credentials to the EnterpriseDB Repository

Before installing the repository configuration file, you must have credentials that allow access to the EnterpriseDB repository. For information about requesting credentials, visit:

https://www.enterprisedb.com/user/login

After receiving your repository credentials you can:

  • Create the repository configuration file.
  • Modify the file, providing your user name and password.
  • Install the repository keys and additional prerequisite software.
  • Install Advanced Server and supporting components.

Installing on CentOS 7 or Rocky Linux/AlmaLinux 8

You can use an RPM package to install Advanced Server on a CentOS 7 or Rocky Linux/AlmaLinux 8 host.

  • To install the repository configuration file, assume superuser privileges and invoke one of the following platform specific commands:

    On CentOS 7:

    yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    On Rocky Linux/AlmaLinux 8:

    dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  • Replace the USERNAME:PASSWORD variable in the following command with the username and password of a registered EnterpriseDB user:

    sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  • Before installing Advanced Server, you must install the epel-release package:

    On CentOS 7:

    # yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
    # yum makecache

    On Rocky Linux/AlmaLinux 8:

    # dnf -y install epel-release
    
    # dnf makecache
  • For Rocky Linux/AlmaLinux 8, enable the PowerTools repository to satisfy package dependencies:

    dnf config-manager --set-enabled PowerTools

    On Rocky Linux/AlmaLinux 8, disable the built-in PostgreSQL module:

    dnf -qy module disable postgresql

The repository configuration file is named edb.repo. The file resides in /etc/yum.repos.d.

You must download and install the repository key. Provide the registered username and password with the curl command to download the repository key using the following command:

curl -o /etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY https://<username>:<password>@yum.enterprisedb.com/ENTERPRISEDB-GPG-KEY

Use the following command to install the key:

rpm --import /etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY

Then, you can use yum install or dnf install command to install Advanced Server. For example, to install the server and its core components, use the command:

  • On CentOS 7:

    yum -y install edb-as12-server
  • On Rocky Linux/AlmaLinux 8:

    dnf -y install edb-as12-server

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 a y, and press Return to continue.

After installing Advanced Server, you must configure the installation. For more information, see Configuring a Package Installation.

Note

During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve.

Installing on RHEL

You can use an RPM package to install Advanced Server on a RHEL host.

  • To install the repository configuration file, assume superuser privileges and invoke one of the following platform specific commands:

    On RHEL 7:

    yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    On RHEL 8:

    dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  • Replace the USERNAME:PASSWORD variable in the following command with the username and password of a registered EnterpriseDB user:

    sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  • Before installing Advanced Server, you must install the epel-release package:

    On RHEL 7:

    # yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
    # yum makecache

    On RHEL 8:

    # dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    
    # dnf makecache
  • Enable the supporting repositories:

    On RHEL 7, enable the optional, extras, and HA repositories to satisfy package dependencies:

    subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"

    On RHEL 8, enable the codeready-builder-for-rhel-8-*-rpms repository to satisfy package dependencies:

    ARCH=$( /bin/arch )
    
    subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"

    On RHEL 8, disable the built-in PostgreSQL module:

    dnf -qy module disable postgresql

The repository configuration file is named edb.repo. The file resides in /etc/yum.repos.d.

You must download and install the repository key. Provide the registered username and password with the curl command to download the repository key using the following command:

curl -o /etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY https://<username>:<password>@yum.enterprisedb.com/ENTERPRISEDB-GPG-KEY

Use the following command to install the key:

rpm --import /etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY

Then, you can use yum install or dnf install command to install Advanced Server. For example, to install the server and its core components, use the command:

  • On RHEL 7:

    yum -y install edb-as12-server
  • On RHEL 8:

    dnf -y install edb-as12-server

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 a y, and press Return to continue.

After installing Advanced Server, you must configure the installation. For more information, see Configuring a Package Installation.

Note

During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve.

Installing on IBM Power (ppc64le)

You can install EDB Postgres Advanced Server on the following operating systems on IBM Power (ppc64le):

On RHEL 8

This topic describes how to install EDB Postgres Advanced Server and includes steps for getting started with your cluster and creating a database.

There are three steps to completing an installation:

  • Setting up the repository
  • Installing the package
  • Performing the initial configuration

For each step, you must be logged in as superuser.

To log in as a superuser:

sudo su -

Setting up the Repository

  1. To register with EDB to receive credentials for the EDB repository, visit: Repository Access Request.

  2. Set up the EDB repository:

    dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    This creates the /etc/yum.repos.d/edb.repo configuration file.

  3. Replace 'USERNAME:PASSWORD' below with your username and password available from your EDB account in the edb.repo file:

    sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  4. Install EPEL repository and refresh the cache:

    dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    dnf makecache
  5. Enable the codeready-builder-for-rhel-8-*-rpms repository since EPEL packages may depend on packages from it:

    ARCH=$( /bin/arch )
    subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
  6. Disable the built-in PostgreSQL module:

    dnf -qy module disable postgresql

Installing the Package

dnf -y install edb-as12-server

Installing the server package creates an operating system user named enterprisedb. The user is assigned a user ID (UID) and a group ID (GID). The user has no default password. Use the passwd command to assign a password for the user. The default shell for the user is bash and the user's home directory is /var/lib/edb/as12.

On SLES 15

There are two steps to completing an installation:

  • Setting up the repository
  • Installing the package

For each step, you must be logged in as superuser.

# To log in as a superuser:
sudo su -

Before setting up the repository, you need to register with EDB. To receive credentials for the EDB repository, visit: Repository Access Request.

Setting up the Repository

# Install the repository configuration and enter your EDB repository
# credentials when prompted
zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

# Install SUSEConnect to register the host with SUSE, allowing access to SUSE repositories
zypper install SUSEConnect

# Register the host with SUSE, allowing access to SUSE repositories
# You can skip this step if already registered
# Replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE registration information
SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL'

# Activate the required SUSE modules on SUSE 15
SUSEConnect -p PackageHub/15.3/ppc64le

# Refresh the metadata
zypper refresh

On SLES 12

There are two steps to completing an installation:

  • Setting up the repository
  • Installing the package

For each step, you must be logged in as superuser.

# To log in as a superuser:
sudo su -

Before setting up the repository, you need to register with EDB. To receive credentials for the EDB repository, visit: Repository Access Request.

Setting up the Repository

# Install the repository configuration and enter your EDB repository
# credentials when prompted
zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

# Install SUSEConnect to register the host with SUSE, allowing access to SUSE repositories
zypper install SUSEConnect

# Register the host with SUSE, allowing access to SUSE repositories
# You can skip this step if already registered
# Replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE registration information
SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL'

# Activate the required SUSE modules on SUSE 12
SUSEConnect -p PackageHub/12.5/ppc64le
SUSEConnect -p sle-sdk/12.5/ppc64le

# Refresh the metadata
zypper refresh

Installing the Package

zypper -n install edb-as12-server

After installing Advanced Server, you must configure the installation. For more information, see Configuring a Package Installation.

Installing the Package

zypper -n install edb-as12-server

After installing Advanced Server, you must configure the installation. For more information, see Configuring a Package Installation.

Advanced Server RPM Packages

The tables that follow list the RPM packages that are available from EnterpriseDB. You can also use the yum search or dnf search command to access a list of the packages that are currently available from your configured repository. Open a command line, assume superuser privileges, and enter:

On RHEL or CentOS 7:

yum search <package>

On RHEL or Rocky Linux or AlmaLinux 8:

dnf search <package>

Where package is the search term that specifies the name (or partial name) of a package.

Please note: The available package list is subject to change.

Package NamePackage Installs
edb-as12-serverThis package installs core components of the Advanced Server database server.
edb-as12-server-clientClient programs and utilities that you can use to access and manage Advanced Server.
edb-as12-server-contribInstalls contributed tools and utilities that are distributed with Advanced Server. Files for these modules are installed in:

Documentation: /usr/edb/as12/share/doc

Loadable modules: /usr/edb/as12/lib

Binaries: /usr/edb/as12/bin
edb-as12-server-coreIncludes the programs needed to create the core functionality behind the Advanced Server database.
edb-as12-server-develInstalls the header files and libraries needed to compile C or C++ applications that directly interact with an Advanced Server server and the ecpg or ecpgPlus C preprocessor.
edb-as12-server-docsInstalls the readme file.
edb-as12-server-edb_wait_statesInstalls supporting modules for Advanced Server
edb-as12-server-indexadvisorInstalls Advanced Server's Index Advisor feature. The Index Advisor utility helps determine which columns you should index to improve performance in a given workload.
edb-as12-server-libsProvides the essential shared libraries for any Advanced Server client program or interface.
edb-as12-server-llvmjitThis package contains support for Just in Time (JIT) compiling parts of EDBAS queries.
edb-as12-server-pldebuggerThis package implements an API for debugging PL/pgSQL functions on Advanced Server.
edb-as12-server-plperlInstalls the PL/Perl procedural language for Advanced Server. Please note that the edb-as12-server-plperl package is dependent on the platform-supplied version of Perl.
edb-as12-server-plpython
edb-as12-server-plpython3
Installs the PL/Python procedural language for Advanced Server. Please note that the edb-as12-server-plpython package is dependent on the platform-supplied version of Python. By default, the edb-as12-server-plpython3 package is not installed; you need to explicitly install the package using yum. To install edb-as12-server-plpython3 package, you must first uninstall the plpython platform-supplied version of Python.
edb-as12-server-pltclInstalls the PL/Tcl procedural language for Advanced Server. Please note that the edb-as12-pltcl package is dependent on the platform-supplied version of TCL.
edb-as12-server-sqlprofilerThis package installs Advanced Server's SQL Profiler feature. SQL Profiler helps identify and optimize SQL code.
edb-as12-server-sqlprotectThis package installs Advanced Server's SQL Protect feature. SQL Protect provides protection against SQL injection attacks.
edb-as12-server-sslutilsThis package installs functionality that provides SSL support.
edb-as12-server-cloneschemaThis package installs the EDB Clone Schema extension. For more information about EDB Clone Schema, see the EDB Postgres Advanced Server Guide.
edb-as12-server-parallel-cloneThis package installs functionality that supports the EDB Clone Schema extension.
edb-as12-pgagentInstalls pgAgent; pgAgent is a job scheduler for Advanced Server. Before installing this package, you must install EPEL; for detailed information about installing EPEL, see Installation Troubleshooting.
edb-as12-edbplusThe edb-edbplus package contains the files required to install the EDB*Plus command line client. EDB*Plus commands are compatible with Oracle's SQL*Plus.
edb-as12-pgsnmpdSNMP (Simple Network Management Protocol) is a protocol that allows you to supervise an apparatus connected to the network.
edb-as12-pljavaInstalls PL/Java, providing access to Java stored procedures, triggers and functions via the JDBC interface.
edb-as12-pgpool40-extensions
edb-as12-pgpool41-extensions
This package creates pgPool extensions required by the server for use with pgpool.
edb-as12-postgisInstalls POSTGIS meta RPMs.
edb-as12-postgis-coreThis package provides support for geographic objects to the PostgreSQL object-relational database. In effect, PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend spatial database for geographic information systems (GIS), much like ESRI's SDE or Oracle's Spatial extension.
edb-as12-postgis-docsThis package installs pdf documentation of PostGIS.
edb-as12-postgis-jdbcThis package installs the essential jdbc driver for PostGIS.
edb-as12-postgis-utilsThis package installs the utilities for PostGIS.
edb-as12-slony-replicationInstalls the meta RPM for Slony-I.
edb-as12-slony-replication-coreSlony-I builds a primary-standby system that includes all features and capabilities needed to replicate large databases to a reasonably limited number of standby systems.
edb-as12-slony-replication-docsThis package contains the Slony project documentation (in pdf form).
edb-as12-slony-replication-toolsThis package contains the Slony altperl tools and utilities that are useful when deploying Slony replication environments. Before installing this package, you must install EPEL; for detailed information about installing EPEL, see Installation Troubleshooting.
edb-as12-libicuThese packages contain supporting library files.

The following table lists the packages for Advanced Server 12 supporting components.

Package NamePackage Installs
edb-pgpool40
edb-pgpool41
This package contains the pgPool-II installer. The pgpool-II utility package acts as a middleman between client applications and Server database servers. pgpool-II functionality is transparent to client applications; client applications connect to pgpool-II instead of directly to Advanced Server, and pgpool-II manages the connection. EnterpriseDB supports the following pgpool-II features:
- Load balancing
- Connection pooling
- High availability
- Connection limits


pgpool-II runs as a service on Linux systems, and is not supported on Windows systems.
edb-jdbcThe edb-jdbc package includes the .jar files needed for Java programs to access an Advanced Server database.
edb-migrationtoolkitThe edb-migrationtoolkit package installs Migration Toolkit, facilitating migration to an Advanced Server database from Oracle, PostgreSQL, MySQL, Sybase and SQL Server.
edb-ociThe edb-oci package installs the EnterpriseDB Open Client library, allowing applications that use the Oracle Call Interface API to connect to an Advanced Server database.
edb-oci-develThis package installs the OCI include files; install this package if you are developing C/C++ applications that require these files.
edb-odbcThis package installs the driver needed for applications to access an Advanced Server system via ODBC.
edb-odbc-develThis package installs the ODBC include files; install this package if you are developing C/C++ applications that require these files.
edb-pgbouncer114This package contains PgBouncer (a lightweight connection pooler). This package requires the libevent package.
ppas-xdbThis package contains the xDB installer; xDB provides asynchronous cross-database replication.
ppas-xdb-consoleThis package provides support for xDB.
ppas-xdb-libsThis package provides support for xDB.
ppas-xdb-publisherThis package provides support for xDB.
ppas-xdb-subscriberThis package provides support for xDB.
edb-pemThe edb-pem package installs Management Tool that efficiently manages, monitor, and tune large Postgres deployments from a single remote GUI console.
edb-pem-agentThis package is an agent component of Postgres Enterprise Manager.
edb-pem-docsThis package contains documentation for various languages, which are in HTML format.
edb-pem-serverThis package contains server components of Postgres Enterprise Manager.
edb-pgadmin4This package is a management tool for PostgreSQL capable of hosting the Python application and presenting it to the user as a desktop application.
edb-pgadmin4-desktop-commonThis package installs the desktop components of pgAdmin4 for all window managers.
edb-pgadmin4-desktop-gnomeThis package installs the gnome desktop components of pgAdmin4
edb-pgadmin4-docsThis package contains documentation of pgAdmin4.
edb-pgadmin4-webThis package contains the required files to run pgAdmin4 as a web application.
edb-efm40This package installs EDB Failover Manager that adds fault tolerance to database clusters to minimize downtime when a primary database fails by keeping data online in high availability configurations.
edb-rsThis package is a java-based replication framework that provides asynchronous replication across Postgres and EPAS database servers. It supports primary-standby, primary-primary, and hybrid configurations.
edb-rs-clientThis package is a java-based command-line tool that is used to configure and operate a replication network via different commands by interacting with the EPRS server.
edb-rs-datavalidatorThis package is a java-based command-line tool that provides row and column level data comparison of a source and target database table. The supported RDBMS servers include PostgreSQL, EPAS, Oracle, and MS SQL Server.
edb-rs-libsThis package contains certain libraries that are commonly used by ERPS Server, EPRS Client, and Monitoring modules.
edb-rs-monitorThis package is a java-based application that provides monitoring capabilities to ensure a smooth functioning of the EPRS replication cluster.
edb-rs-serverThis package is a java-based replication framework that provides asynchronous replication across Postgres and EPAS database servers. It supports primary-standby, primary-primary, and hybrid configurations.
edb-bartThis package installs the Backup and Recovery Tool (BART) to support online backup and recovery across local and remote PostgreSQL and EDB Advanced Servers.
libevent-edbThis package contains supporting library files.
libiconv-edbThis package contains supporting library files.
libevent-edb-develThis package contains supporting library files.

Updating an RPM Installation

If you have an existing Advanced Server RPM installation, you can use yum or dnf to upgrade your repository configuration file and update to a more recent product version. To update the edb.repo file, assume superuser privileges and enter:

  • On RHEL or CentOS 7:

    yum upgrade edb-repo
  • On RHEL or Rocky Linux or AlmaLinux 8:

    dnf upgrade edb-repo

yum or dnf will update the edb.repo file to enable access to the current EDB repository, configured to connect with the credentials specified in your edb.repo file. Then, you can use yum or dnf to upgrade all packages whose names include the expression edb:

  • On RHEL or CentOS 7:

    yum upgrade edb*
  • On RHEL or Rocky Linux or AlmaLinux 8:

    dnf upgrade edb*
Note

The yum upgrade or dnf upgrade command will only perform an update between minor releases; to update between major releases, you must use pg_upgrade.

For more information about using yum commands and options, enter yum --help on your command line.

For more information about using dnf commands and options, visit:

https://docs.fedoraproject.org/en-US/quick-docs/dnf/

Installing on SLES x86_64

You can install EDB Postgres Advanced Server on the following SLES host:

On SLES 15 x86_64

There are two steps to completing an installation:

  • Setting up the repository
  • Installing the package

For each step, you must be logged in as superuser.

# To log in as a superuser:
sudo su -

Before setting up the repository, you need to register with EDB. To receive credentials for the EDB repository, visit: Repository Access Request.

Setting up the Repository

# Install the repository configuration and enter your EDB repository
# credentials when prompted
zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

# Install SUSEConnect to register the host with SUSE, allowing access to SUSE repositories
zypper install SUSEConnect

# Register the host with SUSE, allowing access to SUSE repositories
# You can skip this step if already registered
# Replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE registration information
SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL'

# Activate the required SUSE modules on SUSE 15
SUSEConnect -p PackageHub/15.3/x86_64

# Refresh the metadata
zypper refresh

Installing the Package

zypper -n install edb-as12-server

After installing Advanced Server, you must configure the installation. For more information, see Configuring a Package Installation.

On SLES 12 x86_64

You must have credentials that allow access to the EnterpriseDB repository to install Advanced Server on a SLES host. To request credentials for the repository, visit:

https://www.enterprisedb.com/repository-access-request

You can use the zypper package manager to install Advanced Server or Advanced Server supporting components on an SLES host. zypper will attempt to satisfy package dependencies as it installs a package, but some components require access to specific repositories that are not hosted at EnterpriseDB.

Before installing EDB Postgres Advanced Server or supporting components, you must:

  • Install the SUSEConnect to register the host with SUSE, allowing access to SUSE repositories using the following command:

    zypper install SUSEConnect
  • Replace registration code and email with your SUSE registration information. Use the command:

    SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL'
  • Add SUSE Package Hub extension and sle-sdk extension to the SLES host using the following commands:

    SUSEConnect -p PackageHub/12.4/x86_64
    SUSEConnect -p sle-sdk/12.4/x86_64

For detailed information about registering a SUSE host, visit:

https://www.suse.com/support/kb/doc/?id=7016626

To add Advanced Server, use the following command to add EnterpriseDB repository configuration files to your SLES host:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

A repository configuration file is created named edb.repo in the /etc/zypp/repos.d directory.

After creating the repository configuration files, use the zypper refresh command to refresh the metadata on your SLES host to include the EnterpriseDB repositories.

To install Advanced Server:

zypper -n install edb-as12-server

Then initialize the database cluster:

PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/as12/bin/edb-as-12-setup initdb

Start the database server:

systemctl start edb-as-12

Connect to the database server:

sudo su – enterprisedb

The following sections provide information about the supporting components. You must use the zypper refresh command to process the repository content.

Java Components:

The OpenJDK (version 1.8) is supported on SLES host for Java components. Before installing Advanced Server or a supporting component that requires Java, you must install OpenJDK (version 1.8).

zypper -n install java-1_8_0-openjdk

Then:

zypper refresh

Install the server:

zypper -n install edb-as12-server

BART:

When installing BART on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install BART:

zypper -n install edb-bart

pgAdmin 4:

When installing pgAdmin 4 on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install pgAdmin 4:

zypper -n install edb-pgadmin4

PEM Server:

When installing PEM Server on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Install the following repository for PEM dependencies:

zypper addrepo https://download.opensuse.org/repositories/Apache:/Modules/SLE_12_SP4/Apache:Modules.repo

Then:

zypper refresh

Install PEM server:

zypper -n install edb-pem

The PEM server installer includes a script (configure-pem-server.sh) to help automate the configuration process for RPM installations. The script is installed in the /usr/edb/pem/bin directory. To invoke the script, use the command:

/usr/edb/pem/bin/configure-pem-server.sh

Failover Manager:

When installing Failover Manager on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install EFM:

zypper -n install edb-efm310

JDBC Connector:

When installing JDBC Connector on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install JDBC:

zypper -n install edb-jdbc

Migration Toolkit:

When installing Migration Toolkit on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install Migration Toolkit:

zypper -n install edb-migrationtoolkit

OCL Connector:

When installing OCL Connector on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install OCL Connector:

zypper -n install edb-oci

ODBC Connector:

When installing ODBC Connector on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install ODBC Connector:

zypper -n install edb-odbc

pgAgent:

When installing pgAgent on a SLES host, you must add the repository configuration file using the following command:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

Then:

zypper refresh

Install pgAgent:

zypper -n install edb-as12-pgagent

Updating Components on a SLES Host:

To update components installed with zypper, use the zypper update command.

Uninstalling Advanced Server on a SLES Host:

To uninstall Advanced Server, assume the identity of a root user and invoke the following command:

zypper remove edb-as12-server

Installing on Debian or Ubuntu

To install Advanced Server on a Debian or Ubuntu host, you must have credentials that allow access to the EnterpriseDB repository. To request credentials for the repository, visit:

https://www.enterprisedb.com/repository-access-request

The following steps will walk you through using the EnterpriseDB apt repository to install a debian package. When using the commands, replace the username and password with the credentials provided by EnterpriseDB.

  • Assume superuser privileges:

    sudo su –
  • Configure the EnterpriseDB repository and replace the username and password placeholders in the following command:

    On Debian 10 and Ubuntu 18:

    a. Set up the EnterpriseDB repository:

    sh -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

    b. Substitute your EnterpriseDB credentials for the username and password placeholders in the following command:

    sh -c 'echo "machine apt.enterprisedb.com login <USERNAME> password <PASSWORD>" > /etc/apt/auth.conf.d/edb.conf'
  • Add support to your system for secure APT repositories:

    apt-get -y install apt-transport-https
  • Add the EDB signing key:

    wget -q -O - https://apt.enterprisedb.com/edb-deb.gpg.key  | sudo apt-key add -
  • Update the repository metadata:

    apt-get update
  • Install Debian package:

    apt-get -y install edb-as12-server
Note

Advanced Server or a supporting component such as MTK or EDB*Plus that requires Java, make sure to install Java version 8 on your system to support EDB Java-based components.

The Debian package manager places Advanced Server and supporting components in the directories listed in the following table:

ComponentLocation
Server/usr/lib/edb-as/12/
Data and Configuration Directory/var/lib/edb-as/12/main

/etc/edb-as/12/main/
pgAgent/usr/lib/edb-as/12
Pgpool/usr/edb/pgpool4.0/
Postgis/usr/lib/edb-as/12/
PGSNMPD/usr/lib/edb-as/12
Slony Replication/usr/lib/edb-as/12
pgBouncer/usr/edb/pgbouncer1.14/
pgBouncer Configuration Files/etc/edb/pgbouncer1.14/pgbouncer.ini

/etc/edb/pgbouncer1.14/userlist.txt
SQL-Profiler/usr/lib/edb-as/12/lib
SQL-Protect/usr/lib/edb-as/12/lib
SSLUTILS/usr/lib/edb-as/12/lib
PL-PERL/usr/lib/edb-as/12/lib
PL-PYTHON/usr/lib/edb-as/12/lib
PLTCL/usr/lib/edb-as/12/lib
EFM/usr/edb/efm-4.0/
JDBC/usr/edb/jdbc
MTK/usr/edb/migrationtoolkit/

Advanced Server Debian Packages

The table that follows lists some of the Debian packages that are available from EnterpriseDB. You can also use the apt list command to access a list of the packages that are currently available from your configured repository. Open a command line, assume superuser privileges, and enter:

apt list edb*

Please note: The available package list is subject to change.

Package NamePackage Installs
edb-as12-serverInstalls core components of the Advanced Server database server.
edb-as12-server-clientIncludes client programs and utilities that you can use to access and manage Advanced Server.
edb-as12-server-coreIncludes the programs needed to create the core functionality behind the Advanced Server database.
edb-as12-server-devThe edb-as12-server-dev package contains the header files and libraries needed to compile C or C++ applications that directly interact with an Advanced Server server and the ecpg or ecpgPlus C preprocessor.
edb-as12-server-docInstalls the readme file.
edb-as12-server-edb_wait_statesInstalls supporting modules for Advanced Server.
edb-as12-server-indexadvisorInstalls Advanced Server's Index Advisor feature. The Index Advisor utility helps determine which columns you should index to improve performance in a given workload.
edb-as12-server-pldebuggerThis package implements an API for debugging PL/pgSQL functions on Advanced Server.
edb-as12-server-plpython
edb-as12-server-plpython3
Installs the PL/Python procedural language for Advanced Server. Please note that the edb-as12-server-plpython package is dependent on the platform-supplied version of Python. By default, the edb-as12-server-plpython3 package is not installed; you need to explicitly install the package using apt. To install edb-as12-server-plpython3 package, you must first uninstall the plpython platform-supplied version of Python.
edb-as12-server-pltclInstalls the PL/Tcl procedural language for Advanced Server. Please note that the edb-as12-pltcl package is dependent on the platform-supplied version of TCL.
edb-as12-server-sqlprofilerThis package installs Advanced Server's SQL Profiler feature. SQL Profiler helps identify and optimize SQL code.
edb-as12-server-sqlprotectThis package installs Advanced Server's SQL Protect feature. SQL Protect provides protection against SQL injection attacks.
edb-as12-server-sslutilsThis package installs functionality that provides SSL support.
edb-as12-server-cloneschemaThis package installs the EDB Clone Schema extension. For more information about EDB Clone Schema, see the EDB Postgres Advanced Server Guide.
edb-as12-server-parallel-cloneThis package installs functionality that supports the EDB Clone Schema extension.
edb-as12-edbplusThe edb-edbplus package contains the files required to install the EDB*Plus command line client. EDB*Plus commands are compatible with Oracle's SQL*Plus.
edb-as12-pgsnmpdSNMP (Simple Network Management Protocol) is a protocol that allows you to supervise an apparatus connected to the network.
edb-pgadmin4pgAdmin 4 provides a graphical management interface for Advanced Server and PostgreSQL databases.
edb-pgadmin-apacheApache support module for pgAdmin 4.
edb-pgadmin4-commonpgAdmin 4 supporting files.
edb-pgadmin4-docpgAdmin 4 documentation module.
edb-as12-pgpool40-extensions
edb-as12-pgpool41-extensions
This package creates pgPool extensions required by the server.
edb-as12-postgis-2.5This package installs POSTGIS support for geospatial data.
edb-as12-postgis-2.5-scriptsThis package installs POSTGIS support for geospatial data.
edb-as12-postgis-doc-2.5This package provides support for POSTGIS.
edb-as12-postgis-gui-2.5This package provides a GUI for POSTGIS.
edb-as12-postgis-jdbcThis package provides support for POSTGIS.
edb-as12-postgis-scriptsThis package provides support for POSTGIS.
edb-as12-pgagentThis package installs pgAgent; pgAgent is a job scheduler for Advanced Server. Before installing this package, you must install EPEL; for detailed information about installing EPEL, see Installation Troubleshooting.
edb-as12-slony-replicationThis package installs the meta RPM for Slony-I.
edb-as12-slony-replication-coreThis package contains core portions of Slony-I to build a primary-standby system that includes all features and capabilities needed to replicate large databases to a reasonably limited number of standby systems.
edb-as12-slony-replication-docsThis package contains the Slony project documentation (in pdf form).
edb-as12-slony-replication-toolsThis package contains the Slony altperl tools and utilities that are useful when deploying Slony replication environments. Before installing this package, you must install EPEL; for detailed information about installing EPEL, see Installation Troubleshooting.
edb-as12-hdfs-fdwThe Hadoop Data Adapter allows you to query and join data from Hadoop environments with your Postgres or Advanced Server instances. It is YARN Ready certified with HortonWorks, and provides optimizations for performance with predicate pushdown support.
edb-as12-hdfs-fdw-docDocumentation for the Hadoop Data Adapter.
edb-as12-mongo-fdwThis EnterpriseDB Advanced Server extension implements a Foreign Data Wrapper for MongoDB.
edb-as12-mongo-fdw-docDocumentation for the Foreign Data Wrapper for MongoDB.
edb-as12-mysql-fdwThis EnterpriseDB Advanced Server extension implements a Foreign Data Wrapper for MySQL.
edb-pgpool40
edb-pgpool41
This package contains the pgPool-II installer. The pgpool-II utility package acts as a middleman between client applications and Server database servers. pgpool-II functionality is transparent to client applications; client applications connect to pgpool-II instead of directly to Advanced Server, and pgpool-II manages the connection. EnterpriseDB supports the following pgpool-II features:
- Load balancing
- Connection pooling
- High availability
- Connection limits


pgpool-II runs as a service on Linux systems, and is not supported on Windows systems.
edb-jdbcThe edb-jdbc package includes the .jar files needed for Java programs to access an Advanced Server database.
edb-migrationtoolkitThe edb-migrationtoolkit package installs Migration Toolkit, facilitating migration to an Advanced Server database from Oracle, PostgreSQL, MySQL, Sybase and SQL Server.
edb-pgbouncer114This package contains PgBouncer (a lightweight connection pooler). This package requires the libevent package.
edb-efm40This package installs EnterpriseDB Failover Manager that adds fault tolerance to database clusters to minimize downtime when a primary database fails by keeping data online in high availability configurations.

Configuring a Package Installation

The packages that install the database server component create a unit file (on version 7.x or 8.x hosts) and service startup scripts.

Creating a Database Cluster and Starting the Service

The PostgreSQL initdb command creates a database cluster; when installing Advanced Server with an RPM package, the initdb executable is in /usr/edb/asx.x/bin. After installing Advanced Server, you must manually configure the service and invoke initdb to create your cluster. When invoking initdb, you can:

  • Specify environment options on the command line.
  • Include the systemd service manager on RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x and use a service configuration file to configure the environment.

To review the initdb documentation, visit:

https://www.postgresql.org/docs/12/static/app-initdb.html

After specifying any options in the service configuration file, you can create the database cluster and start the service; these steps are platform specific.

On RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x

To invoke initdb on a RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x system, with the options specified in the service configuration file, assume the identity of the operating system superuser:

su - root

To initialize a cluster with the non-default values, you can use the PGSETUP_INITDB_OPTIONS environment variable by invoking the edb-as-12-setup cluster initialization script that resides under EPAS_Home/bin.

To invoke initdb export the PGSETUP_INITDB_OPTIONS environment variable with the following command:

PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/as12/bin/edb-as-12-setup initdb

After creating the cluster, use systemctl to start, stop, or restart the service:

systemctl { start | stop | restart } edb-as-12

On Debian 10.x or Ubuntu 18.04

You can initialize multiple clusters using the bundled scripts. To create a new cluster, assume root privileges, and invoke the bundled script:

/usr/bin/epas_createcluster 12 main2

To start a new cluster, use the following command:

/usr/bin/epas_ctlcluster 12 main2 start  

To list all the available clusters, use the following command:

/usr/bin/epas_lsclusters
Note

The data directory is created under /var/lib/edb-as/12/main2 and configuration directory is created under /etc/edb-as/12/main/.

Specifying Cluster Options with INITDBOPTS

You can use the INITDBOPTS variable to specify your cluster configuration preferences. By default, the INITDBOPTS variable is commented out in the service configuration file; unless modified, when you run the service startup script, the new cluster will be created in a mode compatible with Oracle databases. Clusters created in this mode will contain a database named edb, and have a database superuser named enterprisedb.

Initializing the Cluster in Oracle Mode

If you initialize the database using Oracle compatibility mode, the installation includes:

  • Data dictionary views compatible with Oracle databases.
  • Oracle data type conversions.
  • Date values displayed in a format compatible with Oracle syntax.
  • Support for Oracle-styled concatenation rules (if you concatenate a string value with a NULL value, the returned value is the value of the string).
  • Support for the following Oracle built-in packages.
PackageFunctionality compatible with Oracle Databases
dbms_alertProvides the capability to register for, send, and receive alerts.
dbms_jobProvides the capability for the creation, scheduling, and managing of jobs.
dbms_lobProvides the capability to manage on large objects.
dbms_outputProvides the capability to send messages to a message buffer, or get messages from the message buffer.
dbms_pipeProvides the capability to send messages through a pipe within or between sessions connected to the same database cluster.
dbms_rlsEnables the implementation of Virtual Private Database on certain Advanced Server database objects.
dbms_sqlProvides an application interface to the EnterpriseDB dynamic SQL functionality.
dbms_utilityProvides various utility programs.
dbms_aqadmProvides supporting procedures for Advanced Queueing functionality.
dbms_aqProvides message queueing and processing for Advanced Server.
dbms_profilerCollects and stores performance information about the PL/pgSQL and SPL statements that are executed during a performance profiling session.
dbms_randomProvides a number of methods to generate random values.
dbms_redactEnables the redacting or masking of data that is returned by a query.
dbms_lockProvides support for the DBMS_LOCK.SLEEP procedure.
dbms_schedulerProvides a way to create and manage jobs, programs, and job schedules.
dbms_cryptoProvides functions and procedures to encrypt or decrypt RAW, BLOB or CLOB data. You can also use DBMS_CRYPTO functions to generate cryptographically strong random values.
dbms_mviewProvides a way to manage and refresh materialized views and their dependencies.
dbms_sessionProvides support for the DBMS_SESSION.SET_ROLE procedure.
utl_encodeProvides a way to encode and decode data.
utl_httpProvides a way to use the HTTP or HTTPS protocol to retrieve information found at an URL.
utl_fileProvides the capability to read from, and write to files on the operating system’s file system.
utl_smtpProvides the capability to send e-mails over the Simple Mail Transfer Protocol (SMTP).
utl_mailProvides the capability to manage e-mail.
utl_urlProvides a way to escape illegal and reserved characters within an URL.
utl_rawProvides a way to manipulate or retrieve the length of raw data types.

Initializing the Cluster in Postgres Mode

Clusters created in PostgreSQL mode do not include compatibility features. To create a new cluster in PostgreSQL mode, remove the pound sign (#) in front of the INITDBOPTS variable, enabling the "--no-redwood-compat" option. Clusters created in PostgreSQL mode will contain a database named postgres and have a database superuser named postgres.

You may also specify multiple initdb options. For example, the following statement:

INITDBOPTS="--no-redwood-compat -U alice --locale=en_US.UTF-8"

Creates a database cluster (without compatibility features for Oracle) that contains a database named postgres that is owned by a user named alice; the cluster uses UTF-8 encoding.

If you initialize the database using "--no-redwood-compat" mode, the installation includes the following package:

PackageFunctionality non-compatible with Oracle Databases
dbms_aqadmProvides supporting procedures for Advanced Queueing functionality.
dbms_aqProvides message queueing and processing for Advanced Server.
edb_bulkloadProvides direct/conventional data loading capability when loading huge amount of data into a database.
edb_genProvides miscellaneous packages to run built-in packages.
edb_objectsProvides Oracle compatible objects such as packages, procedures etc.
waitstatesProvides monitor session blocking.
edb_dblink_libpqProvides link to foreign databases via libpq.
edb_dblink_ociProvides link to foreign databases via OCI.
snap_tablesCreates tables to hold wait information. Included with DRITA scripts.
snap_functionsCreates functions to return a list of snap ids and the time the snapshot was taken. Included with DRITA scripts.
sys_statsProvides OS performance statistics.

In addition to the cluster configuration options documented in the PostgreSQL core documentation, Advanced Server supports the following initdb options:

--no-redwood-compat

Include the --no-redwood-compat keywords to instruct the server to create the cluster in PostgreSQL mode. When the cluster is created in PostgreSQL mode, the name of the database superuser will be postgres, the name of the default database will be postgres, and Advanced Server’s features compatible with Oracle databases will not be available to the cluster.

--redwood-like

Include the --redwood-like keywords to instruct the server to use an escape character (an empty string ('')) following the LIKE (or PostgreSQL-compatible ILIKE) operator in a SQL statement that is compatible with Oracle syntax.

--icu-short-form

Include the --icu-short-form keywords to create a cluster that uses a default ICU (International Components for Unicode) collation for all databases in the cluster. For more information about Unicode collations, refer to the EDB Postgres Advanced Server Guide available at:

https://www.enterprisedb.com/docs

For more information about using initdb, and the available cluster configuration options, see the PostgreSQL Core Documentation available at:

https://www.postgresql.org/docs/12/static/app-initdb.html

You can also view online help for initdb by assuming superuser privileges and entering:

/path_to_initdb_installation_directory/initdb --help

Where path_to_initdb_installation_directory specifies the location of the initdb binary file.

Modifying the Data Directory Location on RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x

On a RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x host, the unit file is named edb-as-12.service and resides in /usr/lib/systemd/system. The unit file contains references to the location of the Advanced Server data directory. You should avoid making any modifications directly to the unit file because it may be overwritten during package upgrades.

By default, data files reside under /var/lib/edb/as12/data directory. To use a data directory that resides in a non-default location, perform the following steps:

  • Create a copy of the unit file under the /etc directory:

    cp /usr/lib/systemd/system/edb-as-12.service /etc/systemd/system/
  • After copying the unit file to the new location, create the service file /etc/systemd/system/edb-as-12.service and include /lib/systemd/system/edb-as-12.service within the file.

  • Use the following command to reload systemd, updating the modified service scripts:

    systemctl daemon-reload
  • Start the Advanced Server service with the following command:

    systemctl start edb-as-12

Starting Multiple Postmasters with Different Clusters

You can configure Advanced Server to use multiple postmasters, each with its own database cluster. The steps required are version specific to the Linux host.

On RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x

The edb-as12-server-core RPM for version 7.x | 8.x contains a unit file that starts the Advanced Server instance. The file allows you to start multiple services, with unique data directories and that monitor different ports. You must have root access to invoke or modify the script.

The example that follows creates an Advanced Server installation with two instances; the secondary instance is named secondary:

  • Make a copy of the default file with the new name. As noted at the top of the file, all modifications must reside under /etc. You must pick a name that is not already used in /etc/systemd/system.

    cp /usr/lib/systemd/system/edb-as-12.service /etc/systemd/system/secondary-edb-as-12.service
  • Edit the file, changing PGDATA to point to the new data directory that you will create the cluster against.

  • Create the target PGDATA with user enterprisedb.

  • Run initdb, specifying the setup script:

    /usr/edb/as12/bin/edb-as-12-setup initdb secondary-edb-as-12
  • Edit the postgresql.conf file for the new instance, specifying the port, the IP address, TCP/IP settings, etc.

  • Make sure that new cluster runs after a reboot:

    systemctl enable secondary-edb-as-12
  • Start the second cluster with the following command:

    systemctl start secondary-edb-as-12

Creating an Advanced Server Repository on an Isolated Network

You can create a local repository to act as a host for the Advanced Server RPM packages if the server on which you wish to install Advanced Server (or supporting components) cannot directly access the EnterpriseDB repository. Please note that this is a high-level listing of the steps requires; you will need to modify the process for your individual network.

To create and use a local repository, you must:

  • Use yum or dnf to install the epel-release, yum-utils, and createrepo packages.

    On RHEL or CentOS 7.x:

    yum install epel-release
    yum install yum-utils
    yum install createrepo

    On RHEL or Rocky Linux or AlmaLinux 8.x:

    dnf install epel-release
    dnf install yum-utils
    dnf install createrepo
  • Create a directory in which to store the repository:

    mkdir /srv/repos
  • Copy the RPM installation packages to your local repository. You can download the individual packages or use a tarball to populate the repository. The packages are available from the EnterpriseDB repository at https://repos.enterprisedb.com/.

  • Sync the RPM packages and create the repository.

    reposync -r edbas12 -p /srv/repos
    createrepo /srv/repos
  • Install your preferred webserver on the host that will act as your local repository, and ensure that the repository directory is accessible to the other servers on your network.

  • On each isolated database server, configure yum or dnf to pull updates from the mirrored repository on your local network. For example, you might create a repository configuration file called /etc/yum.repos.d/edb-repo with connection information that specifies:

    [edbas12]
    name=EnterpriseDB Advanced Server 12
    baseurl=https://yum.your_domain.com/edbas12
    enabled=1
    gpgcheck=0

After specifying the location and connection information for your local repository, you can use yum or dnf commands to install Advanced Server and its supporting components on the isolated servers. For example:

  • On RHEL or CentOS 7:

    yum -y install edb-as12-server
  • On RHEL or Rocky Linux or AlmaLinux 8:

    dnf -y install edb-as12-server

For more information about creating a local yum repository, visit:

https://wiki.centos.org/HowTos/CreateLocalRepos