Installing a PEM Agent on Linux¶
Installing a PEM agent on a CentOS or RHEL 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 by running any one of the following commands:
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install epel-release
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 PEM Agent:
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 a PEM Agent on a Debian or Ubuntu Host¶
To install PEM 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 root:
sudo su -
Configure the EnterpriseDB repository:
sh -c 'echo "deb https://username:email@example.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:firstname.lastname@example.org/edb-deb.gpg.key | apt-key add –
Update the repository metadata:
Use the following command to install the Debian package for the PEM agent:
apt-get install edb-pem-agent
Installing a PEM Agent on a SLES Host¶
For detailed information about installing Advanced Server and supporting components on a SLES host, please consult the
SLES packages are available from:
Before installing PEM, you must install prerequisite packages. Use the following commands replacing sp_no with the service pack that you are using (i.e. SP2 or SP3):
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_12_<sp_no>/Apache:Modules.repo zypper addrepo http://download.opensuse.org/repositories/Cloud:/OpenStack:/Newton:/cisco-apic:/2.3.1/SLE_12_<sp_no>/ pem_opensuse_boost zypper refresh zypper install edb-pem-agent
Registering an Agent¶
Each PEM agent must be registered with the PEM server. The
registration process provides the PEM server with the information it
needs to communicate with the agent. The PEM agent graphical installer
supports agent self-registration, but you can use the
to register the agent if you skip PEM agent registration during a
graphical installation or use an RPM package to install a PEM agent.
The RPM installer places the PEM agent in the
directory. To register an agent, include the
along with registration details when invoking the
Append command line options to the command string when invoking the pemworker utility. Each option should be followed by a corresponding value:
Specifies the IP address of the PEM backend database server. This parameter is required.
Specifies the port of the PEM backend database server. The default value is 5432.
Specifies the name of the Database user (having superuser privileges) of the PEM backend database server. This parameter is required.
Specifies the agent user to connect the PEM server backend database server.
Specifies the complete path to the directory in which certificates will be created. If you do not provide a path, certificates will be created in: On Linux, ~/.pem On Windows, %APPDATA%/pem
Specifies the directory path where configuration file can be found. The default is the <pemworker path>/../etc.
Specifies a user-friendly name for the agent that will be displayed in the PEM Browser tree control. The default is the system hostname.
Include the force_registration clause to instruct the PEM server to register the agent with the arguments provided; this clause is useful if you are overriding an existing agent configuration. The default value is Yes.
The name of the group in which the agent will be displayed.
The name of the database role, on the PEM backend database server, that should have access to the monitored database server.
The name of the database user, on the PEM backend database server, who will own the agent.
Enable the allow-server_restart parameter to allow PEM to restart the monitored server. The default value is True.
Enable the allow-batch-probes parameter to allow PEM to run batch probes on this agent. The default value is False.
Specifies the operating system user that should be used for executing the batch/shell scripts. The default value is none; the scripts will not be executed if you leave this parameter blank or the specified user does not exist.
Enable the enable-heartbeat-connection parameter to create a dedicated heartbeat connection between PEM Agent and server to update the active status. The default value is False.
Enable the enable-smtp parameter to allow the PEM agent to send the email on behalf of the PEM server.The default value is False.
Enable the enable-snmp parameter to allow the PEM agent to send the SNMP traps on behalf of the PEM server.The default value is False.
Specify if you want to override the configuration file options.
If you want to use any PEM feature for which database server restart is required by the pemagent such as Audit Manager, Log Manager, or Tuning Wizard, then you must set the value for
true in the
When configuring a shell/batch script run by a PEM agent that has PEM 7.11 or later version installed, the user for the
batch_script_user parameter must be specified. It is strongly recommended that a non-root user is used to run the scripts. Using the root user may result in compromising the data security and operating system security. However, if you want to restore the pemagent to its original settings using
root user to run the scripts, then the
batch_script_user parameter value must be set to
Before any changes are made on the PEM database, the connecting agent is
authenticated with the PEM database server. When invoking the pemworker
utility, you must provide the password associated with the PEM server
administrative user role (
postgres). There are three ways to specify the
administrative password; you can:
provide the password on the command line with the
create an entry in the
Failure to provide the password will result in a password authentication error; you will be prompted for any other required but omitted information. When the registration is complete, the server will confirm that the agent has been successfully registered.
Setting PEM Agent Configuration Parameters
The PEM agent RPM installer creates a sample configuration file named
agent.cfg.sample in the
/usr/edb/pem/agent/etc directory. When you register
the PEM agent, the
pemworker program creates the actual agent
configuration file (named
agent.cfg). You must modify the
file, adding the following configuration parameter:
heartbeat_connection = true
You must also add the location of the
ca-bundle.crt file (the
certificate authority). By default, the installer creates a
ca-bundle.crt file in the location specified in your
file. You can copy the default parameter value from the sample file, or,
if you use a
ca-bundle.crt file that is stored in a different location,
specify that value in the
Then, use a platform-specific command to start the PEM agent service;
the service is named
pemagent. For example, on a CentOS or RHEL 7.x host, use systemctl to start the service:
systemctl start pemagent
The service will confirm that it is starting the agent; when the agent
is registered and started, it will be displayed on the
Global Overview and in the
Object browser of the PEM web interface.
For information about using the
pemworker utility to register a server,
please see the PEM Administrator’s Guide