cancel
Showing results for 
Search instead for 
Did you mean: 

PEM 6 Quickstart

EDB Team Member

Objective

Quickly (less than five minutes) install and run a default PEM 6 installation on RHEL 6/7

Prerequisites

Running instance of RHEL 6/7 with root access that can display a GUI

 

Components

There are three primary components to PEM:

  1. PEM Server

    • PEM Repository (database for storing metrics)

    • Apache HTTPD (provides browser interface and backend to thick client)

  2. PEM Agent (a daemon that can run on each operating system that PEM monitors)

  3. PEM Client (a thick client GUI)

 

Steps (as root user)

#!/bin/bash

#
# Make sure umask is 0022
#
umask 0022

#
# Make sure /tmp can be executed from (if in a hardened
# environment)
# Make sure anything in the Postgres registry is valid
#
cat /etc/postgres-reg.ini

#
# Setup YUM repository for installing EPAS as the PEM
# repository
#
rpm -Uvh http://yum.enterprisedb.com/edbrepos/edb-repo-9.6-4.noarch.rpm

#
# Set YUM username/password in edb.repo
#
export YUM_USER=<yum user>
export YUM_PASSWORD=<yum password>
sed -i "s/<username>:<password>/$YUM_USER:$YUM_PASSWORD/g" /etc/yum.repos.d/edb.repo

#
# Enable the EPAS 9.5 repo in edb.repo
#
sed -i "\/ppas95/,/gpgcheck/ s/enabled=0/enabled=1/" /etc/yum.repos.d/edb.repo

#
# Install EPAS 9.5
#
yum -y install ppas95-server

#
# Start the EPAS server and initialize a new Postgres
# data directory using the appropriate mechanism
# for the operating system
#
if [ `cat /etc/redhat-release | grep "release 7" | wc -l` = 1 ]
  then
    /usr/lib/systemd/system/ppas-9.5.sh initdb
    su - enterprisedb -c "sed -i 's/ident/md5/g' /var/lib/ppas/9.5/data/pg_hba.conf"
    systemctl start ppas-9.5.service
elif [ `cat /etc/redhat-release | grep "release 6" | wc -l` = 1 ]
  then
    service ppas-9.5 initdb
    su - enterprisedb -c "sed -i 's/ident/md5/g' /var/lib/ppas/9.5/data/pg_hba.conf"
    service ppas-9.5 start
else
  su - enterprisedb -c "/usr/ppas-9.5/bin/initdb -D /var/lib/ppas/9.5/data --auth='md5'"
  su - enterprisedb -c "/usr/ppas-9.5/bin/pg_ctl -D /var/lib/ppas/9.5/data start"
fi

#
# Set a default password for the enterprisedb user
#
su - enterprisedb -c "psql -d postgres -c 'alter user enterprisedb identified by enterprisedb'"

#
# Get the PEM Server installer, currently not available
# via RPMs
#
curl http://get.enterprisedb.com/pem/pem_server-6.0.1-4-linux-x64.run > ./installer.run

#
# Make installer executable and extract the embedded installers
# which is done automatically if you run it directly via GUIs
#
chmod 777 ./installer.run
./installer.run --extract-dependents .

#
# Install the language pack
#
./edb_languagepack-*.run --mode unattended

#
# Install Apache for the PEM server (disable SELinux for the install)
#
setenforce permissive
./apachehttpd-*.run --mode unattended --prefix /opt/PEM/EnterpriseDB-Apache
setenforce enforcing

#
# Install the PEM application (DB schema and Appache app), this
# installer includes an agent so does not need separately
# installed (user/password only needed if connected to internet)
#
export EDB_PORTAL_USER=<web portal user>
export EDB_PORTAL_PASSWORD=<web portal password>
./installer.run --mode unattended --prefix /opt/PEM/pem --pguser enterprisedb --pgpassword enterprisedb --pgport 5444 --servicename ppas-9.5 --cidr-address 0.0.0.0/0 --existing-user $EDB_PORTAL_USER --existing-password $EDB_PORTAL_PASSWORD

#
# [Optional] Download and install the PEM thick client, installing a dependency first
#
yum -y install libgtk-x11* glib2 liberation* alsa-lib
curl http://get.enterprisedb.com/pem/pem_client-6.0.1-4-linux-x64.run > ./client_installer.run
chmod 777 ./client_installer.run
./client_installer.run --mode unattended --prefix /opt/PEM

 

#
# For the thin client, open the http://localhost:8080/pem in
# a browser and use username/password of enterprisedb/enterprisedb.
# Click “cancel” on the license dialog.
#
firefox http://localhost:8080/pem


 

#
# For the thick client, run the following as any user
#
/opt/PEM/client-v6/scripts/launchPEMClient.sh

#
# Select “File | PEM Server Login”,enter this in the dialog,
# and click the OK button.
# Host: localhost
# Port: 8080
# Use SSL: <unchecked>
# Username: enterprisedb
# Password: enterprisedb
# Login at Startup: <checked>
#

 
 

Tips


Summary

This guide is intended to get you up and started with a default installation of PEM as quickly as possible.  This is just the beginning though.  Please stay tuned for more tutorials and demos of specific features available in PEM.