Installing a PEM Agent

You can use a graphical installer to install the Postgres Enterprise Manager agent on a Windows host. This graphical installer can also be invoked from command line.

To install the Postgres Enterprise Manager agent on a Linux host, you must use an RPM package.

Installers are available from the EnterpriseDB website at:

Installing an Agent on a Windows Host

On a Windows system,you can invoke the installer by right-clicking on the downloaded installer’s icon, and selecting Run as Administrator. The PEM Agent Setup Wizard opens, welcoming you.

The PEM Agent installer welcome window

The PEM Agent installer welcome window

Click Next to continue to the License Agreement.

The PEM license agreement

The PEM license agreement

Carefully review the license agreement before highlighting the appropriate radio button and accepting the agreement; click Next to continue to the Installation Directory dialog.

Specify an Installation Directory

Specify an Installation Directory

By default, the PEM agent is installed in the /home/opt/PEM directory. You can accept the default installation directory, or modify the contents of the Installation Directory field, specifying an alternate installation directory for the PEM agent.

By default, the PEM agent installer places a certificate in the Administrator’s %APPDATA%\pem directory. Check the Show advanced options box to indicate that you would like the PEM agent installer to include a dialog that allows you to specify an alternate path for the certificate file.

Check the box next to Register now? to instruct the installer to register the newly installed PEM agent with the PEM server. Click Next to continue to the PEM Server Installation Details dialog.

Provide PEM server installation details

Provide PEM server installation details

Enter the connection details for the PEM server on the PEM server installation details dialog:

  • Specify the name or IP address of the system on which the PEM database server resides in the Host field. Please note: If the PEM-HTTPD web server and PEM database are hosted on different systems, you must specify the host of the PEM database.
  • Specify the name of the database superuser in the User Name field.
  • Specify the password associated with the database superuser in the Password field.
  • Specify the port that PostgreSQL is monitoring in the Port field.

Click Next to continue. The installer will attempt to connect to the server to verify that the details are correct.

Note

The PEM server must allow connections from the PEM agent installer. If you encounter a connection error, confirm the connection properties specified on the PEM Server Installation Details dialog are correct, and confirm that the pg_hba.conf file (on the PEM server) will allow a connection to the server described in the error message.

Specify a descriptive name for the PEM agent

Specify a descriptive name for the PEM agent

The tree control displayed in the Browser panel of the PEM web interface displays the value entered in the Description field to identify the PEM agent. Specify a descriptive name for the agent, such as the hostname of the machine the agent is installed on, or a name that reflects the host’s functionality. Provide a descriptive name, or accept the default provided by the PEM agent host, and click Next to continue.

If you checked the Show advanced options checkbox, the Advanced options dialog opens:

Provide the certificate path

Provide the certificate path

By default, the PEM agent installer places the certificate in the /root/.pem directory. Specify an alternate path for the certificate or accept the default and click Next. The wizard is now ready to install the PEM agent; click Back to amend the installation directory, or Next to continue.

The PEM Agent installation is ready to begin

The PEM Agent installation is ready to begin

Click Next on the Ready to Install dialog to instruct the installer to copy files to the system and register the agent on the PEM server.

Progress bars mark the installation's progress

Progress bars mark the installation’s progress

The PEM agent installer displays progress bars to mark the PEM agent’s installation progress.

The PEM Agent installation is complete

The PEM Agent installation is complete

When the installation has completed, the PEM agent will be running and reporting operating system and host data to the PEM server. To start monitoring Postgres instances on the host of the PEM agent, they must now be added to PEM’s enterprise directory and bound to the agent.

Invoking a Graphical Installer from the Command Line

The command line options of PEM agent graphical installer offers functionality in situations where a graphical installation may not work because of limited resources or system configuration. You can:

  • Include the --mode unattended option when invoking the installer to perform an installation without additional user input.
  • Include the --mode text option when invoking the installer to perform an installation from the command line with an interactive installer.

For a complete reference guide to the command line options, include the –help option when you invoke the installer.

Invoking a Graphical Installer in Text Mode

You can invoke the PEM agent installer at the command line to perform an interactive installation if your system does not support a full graphical installation. Please note that the system on which you are installing the agent must have access to the PEM server.

You must have Administrative privileges to install the PEM server. You can invoke the PEM server installer with the following command:

pem-server-7.x.x-windows-x64.exe --mode text

Example:

When you invoke the PEM agent installer, the installer welcomes you:

--------------------------------------------------------------------
Welcome to the Postgres Enterprise Manager (PEM) Agent Setup Wizard.
--------------------------------------------------------------------

Before installing the PEM server, you must review and accept the terms of the PEM license agreement:

Please read the following License Agreement. You must accept the
terms of this agreement before continuing with the installation.

Press [Enter] to continue:
Do you accept this license? [y/n]:
-----------------------------------------------------------------

Next, you will be prompted for an installation directory; you can use the default installation directory, or specify an alternate location. By default, the PEM agent installer places a certificate in the Administrator’s %APPDATA%\pem directory. Enter a Y after Show advanced options to access menu options that allow you to specify an alternate path for the certificate file.

Installation Directory
Please select a directory for PEM agent installation.
Installation Directory [/opt/edb/pem]:
Show advanced options [y/N]:
-----------------------------------------------------------------

When prompted, provide information about the PEM server installation:

PEM server installation details``
Please verify the PEM server installation details
Host [localhost]:
User Name [postgres]:
Password :
Port [5432]:
-----------------------------------------------------------------

You can provide a descriptive name for the agent, or press Return to accept the default:

Agent Details
Please provide the agent description
Description [localhost]:
-----------------------------------------------------------------
The installer will prompt you before it proceeds with the installation; press Return to start the installation:
Setup is now ready to begin installing the PEM agent on your
computer.
Do you want to continue? [Y/n]:
-----------------------------------------------------------------

Please wait while Setup installs the PEM agent on your computer.

Installing
0% ______________ 50% ______________ 100%
#########################################

The installer will notify you when the installation is complete:

EnterpriseDB is the leading provider of value-added products and services for the Postgres community.
Please visit our website at www.enterprisedb.com.

Invoking a graphical installer in unattended mode

You can perform an unattended PEM agent installation by providing installation preferences on the command line when invoking the installer. Please note that the system on which you are installing the PEM server must have internet access.

Before invoking the PEM agent installer in unattended mode, you must:

  • install the PEM server; the pg_hba.conf file of the PEM server must allow connections from the host of the PEM agent.
  • ensure that the monitored Postgres database has SSL enabled, and is accepting connections.

You must have Administrator privileges to install the PEM agent. Use the following command to invoke the PEM agent installer in unattended mode:

pem-agent-7<.x.x>-windows-x64.exe --mode unattended
--pghost <pem_server_host_address> --pgport <pem_server_port>
--pguser postgres --pgpassword <pguser_password>
--agent_description <agent_name>

Where: x.x specifies the version of PEM agent. pem_server_host_address specifies the IP address of the host of the PEM server. pem_server_port specifies the port used by the backing PEM database; by default, the database uses port 5432 . pguser_password specifies the password associated with the PEM database superuser. agent_name specifies a descriptive name for the PEM agent.

Installing an agent on a RHEL or CentOS host

On a RHEL or CentOS system, you can use the yum package manager to install a PEM agent.

Prerequsites: Before using a package manager to install the PEM agent, the host must contain the epel-release and wxBase packages. To install these packages, open a command line, assume root privileges, and invoke the commands:

  • yum install epel-release
  • yum install wxBase

You must also have credentials for the EnterpriseDB repository. To request credentials for the repository, contact EnterpriseDB .

After installing the pre-requisite packages, you can install the PEM agent:

  1. Download the edb-repo installation package from: http://yum.enterprisedb.com/

The edb-repo package creates the repository configuration file named edb.repo. The edb.repo file defines multiple repositories hosted at EnterpriseDB.com.

  1. Assume superuser privileges and use the following command to install the edb -repo package, and create the repository configuration file:

    rpm -Uvh edb-repo-<x>.noarch.rpm

Where x specifies the version of the file.

Then, use your choice of editor to modify the configuration file, enabling the enterprisedb - tools and enterprisedb - dependencies repositories. The configuration file is named edb.repo ; it resides in /etc/yum.repos.d. To enable a repository, change the value of the enabled parameter to 1 and replace the user _ name and password placeholders in the baseurl specification with your repository credentials. For example:

[enterprisedb-tools]

name=EnterpriseDB Tools $releasever - $basearch

baseurl=http://<user_name>:<password>@yum.enterprisedb.com/tools/r
edhat/rhel-$releasever-$basearch

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
[enterprisedb-dependencies]

name=EnterpriseDB Dependencies $releasever - $basearch
Copyright -----------------------------------------------© 2013 - 2019 EnterpriseDB Corporation. All rights reserved.
77EDB Postgres Enterprise Manager Installation Guide

baseurl=http://user_name:password@yum.enterprisedb.com/depende
ncies/redhat/rhel-$releasever-$basearch

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
[edbas96]

name=EnterpriseDB Advanced Server 9.6 $releasever - $basearch

baseurl=http://user_name:password@yum.enterprisedb.com/9.6/red
hat/rhel-$releasever-$basearch

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
  1. After modifying the content of the repository configuration file, you can use yum to install the PEM agent:

    yum install edb-pem-agent

When the installation is complete, yum will display a list of the installed packages and dependencies.

Using an RPM package to install the PEM agent

Using an RPM package to install the PEM agent

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.

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 an Agent on a SLES Host

For detailed information about installing Advanced Server and supporting components on a SLES host, please consult the EDB Postgres Advanced Server Installation Guide, available at:

SLES packages are available from:

Before installing a PEM agent, you must install prerequisite packages.

Use the following commands in the given sequence to install the agent:

SUSEConnect -p sle-module-legacy/12/x86_64

SUSEConnect -p sle-sdk/12/x86_64

zypper addrepo https://download.opensuse.org/repositories/Apache:Modules/<SLE_version_service_pack>/Apache:Modules.repo

zypper addrepo http://download.opensuse.org/repositories/Cloud:/OpenStack:/Newton:/cisco-apic:/2.3.1/<SLE_version_service_pack>/ pem_opensuse_boost

zypper refresh

zypper install edb-pem-agent

Where SLE_version_service_pack is the version and service pack of the SLES that you are using, such as SLE_12_SP2 or SLE_12_SP3.

Installing an Agent on a Debian or Ubuntu Host

To install PEM agent on a Debian or Ubuntu host, you must have credentials that allow access to the EnterpriseDB repository. To request credentials for the repository, contact EnterpriseDB .

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.

  1. Go to https://apt.enterprisedb.com/ and log in as root:

    sudo su

  2. Configure the EnterpriseDB repository:

    sh -c 'echo "deb https://<username>:<password>@apt.enterprisedb.com/$(lsb_release - cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb- $(lsb_release -cs).list'

  3. Add support to your system for secure APT repositories:

    apt-get install apt-transport-https

  4. Add the EBD signing key:

    wget -q -O -https://<username>:<password>@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add

5 . Update the repository metadata:

apt-get update
  1. Use the following command to install the Debian package for PEM agent:

    apt-get install edb-pem-agent