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.
Next to continue to the
Carefully review the license agreement before highlighting the appropriate radio button and accepting the agreement; click
Next to continue to the
Installation Directory dialog.
By default, the PEM agent is installed in the
C:\Program Files (x86)\edb\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%\edb\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.
Next to continue to the
PEM Server Installation Details dialog.
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
Hostfield. Please note: If the
PEM-HTTPDweb 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
- Specify the password associated with the database superuser in the
- Specify the port that PostgreSQL is monitoring in the
Next to continue to the
pemAgent service account dialog. The installer will attempt to connect to the server to verify that the details are correct.
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.
Provide the password for the
edb account under which the pemAgent service will run.The agent certificate and key files will be create in its
C:\Users\edb\AppData\Roaming\pem directory. Click
Next to continue to
Agent Details dialog.
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:
By default, the PEM agent installer places the certificate in the
C:\Program Files (x86)\edb\pem directory. Specify an alternate path for the certificate or accept the default and click
The wizard is now ready to install the PEM agent; click
Back to amend the installation directory, or
Next to continue.
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.
The PEM agent installer displays progress bars to mark the PEM agent’s installation progress.
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¶
You can include the
--mode unattended option when invoking the installer to perform an installation without additional user input.
For a complete reference guide to the command line options, include the
--help option when you invoke the installer.
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.conffile 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>
x.x specifies the version of PEM agent.
pem_server_host_address specifies the IP address of the host of the PEM
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
agent_name specifies a descriptive name for the PEM agent.
When configuring a shell/batch script run by a Windows agent that has PEM 7.11 or later version installed, the
AllowBatchJobSteps parameter must be set to True in the
agent.cfg file. The pemagent will not execute any batch/shell script by default.
Installing an Agent on a RHEL or CentOS host¶
On a Linux system, you can use the
yum package manager to install a PEM
agent. Please note that before using a package manager to install the
PEM agent on a host, you must:
epel-releasepackage on the host:
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
You may need to enable the
[extras]repository definition in the
CentOS-Base.repofile (located in
You must also have credentials that allow access to the EnterpriseDB repository. For information about requesting credentials, visit:
After receiving your repository credentials you can:
- Create the repository configuration file.
- Modify the file, providing your user name and password.
Creating a Repository Configuration File
To create the repository configuration file, assume superuser privileges, and invoke the following command:
yum -y install https://yum.enterprisedb.com/edb-repo-rpms/edb-repo-latest.noarch.rpm
The repository configuration file is named
edb.repo. The file resides in
Modifying the file, providing your user name and password
After creating the
edb.repo file, use your choice of editor to ensure that the value of the enabled parameter is
1, and replace the
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
Installing PEM Agent
After saving your changes to the configuration file, you can use the yum install command to install
edb-pem-agent. For example, the following command installs
yum install edb-pem-agent
When the installation is complete,
yum will display a list of the
installed packages and dependencies.
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.
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
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.
Go to https://apt.enterprisedb.com/ and log in as
sudo su –
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'
Add support to your system for secure APT repositories:
apt-get install apt-transport-https
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:
Use the following command to install the Debian package for PEM agent:
apt-get install edb-pem-agent