cancel
Showing results for 
Search instead for 
Did you mean: 

PEM 7 Multiple node configuration Quick Start.

EDB Team Member

Objective

Quickly (less than five minutes) install and run a PEM 7 installation in a multinode (database and web server on different hosts) on RHEL 6/7. I am dividing these instructions into two steps. At Step1, we will install EPAS 9.6 software and create a brand new database cluster which we will use to store the PEM repository database. If you like to use one of the existing databases to store PEM repository, you can skip Step1 and go directly to the Step2. In Step2 we will install the PEM server on both database node and the web server node.

 

Prerequisites

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

- Firewall rules allow you to create session between the database server and the web server at port 5444. 

- You need YUM credentials from the enterprisedb and set up the two variables EDB_YUM_USERNAME and EDB_YUM_PASSWORD

- You will need to register with enterprisedb to get a username and password and use them to set up the two variables EDB_PORTAL_USER and EDB_PORTAL_PASSWORD

 

 

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. In PEM 7 there is no thick client. You can access the PEM7 dashboard at http://apacheserver_ip_address:8080/pemserver

 

 


export EDB_YUM_USERNAME=
export EDB_YUM_PASSWORD=

rpm -Uvh http://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
sed -i "s/<username>:<password>/$EDB_YUM_USERNAME:$EDB_YUM_PASSWORD/g" /etc/yum.repos.d/edb.repo \
&& sed -i "\/edbas96/,/gpgcheck/ s/enabled=0/enabled=1/" /etc/yum.repos.d/edb.repo \
&& sed -i "\/enterprisedb-dependencies/,/gpgcheck/ s/enabled=0/enabled=1/" /etc/yum.repos.d/edb.repo \
&& sed -i "\/enterprisedb-tools/,/gpgcheck/ s/enabled=0/enabled=1/" /etc/yum.repos.d/edb.repo \
&&
yum -y install edb-as96-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/edb/as9.6/bin/edb-as-96-setup initdb
  systemctl start edb-as-9.6
elif [ `cat /etc/redhat-release | grep "release 6" | wc -l` = 1 ]
 then
   service edb-as-9.6 initdb
   service edb-as-9.6 start
fi

  su - enterprisedb -c "sed -i \"s/ident/md5/g\" /var/lib/edb/as9.6/data/pg_hba.conf" \
   && echo "host all all 0.0.0.0/0 md5" >>pg_hba.conf

#
# 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
# following can be a NFS mount visible to both database server and http server
cd /NFS
curl https://get.enterprisedb.com/pem/pem-server-7.1.0-1-linux-x64.run > ./installer.run
chmod 777 installer.run

##You have to register with the enterprisedb website and use that for the following variables
export EDB_PORTAL_USER=
export EDB_PORTAL_PASSWORD=

#Schema/Database creation to host PEM repository
./installer.run --mode unattended --prefix /opt/PEM/pem --pguser enterprisedb --install-type db --pgpassword enterprisedb --pghost 172.17.0.2 --pgport 5444 --servicename edb-as-9.6 --cidr-address 0.0.0.0/0 --existing-user $EDB_PORTAL_USER --existing-password $EDB_PORTAL_PASSWORD

##########################
##STEP 2
###On the database server
#Schema/Database creation to host PEM repository
./installer.run --mode unattended --prefix /opt/PEM/pem --pguser enterprisedb --install-type db --pgpassword enterprisedb --pghost 172.17.0.2 --pgport 5444 --servicename edb-as-9.6 --cidr-address 0.0.0.0/0 --existing-user $EDB_PORTAL_USER --existing-password $EDB_PORTAL_PASSWORD

##############################
####Apache server Installation
###########################

#
# Install Apache for the PEM server (disable SELinux for the install)
#

##if you are not using NFS mount you will have to do the following Steps
#cd /tmp
# curl https://get.enterprisedb.com/pem/pem-server-7.1.0-1-linux-x64.run > ./installer.run
# chmod 777 installer.run


#
cd /NFS
./installer.run --extract-dependents .
./edb-languagepack-*.run --mode unattended


setenforce permissive
./pem-httpd*.run --mode unattended --prefix /opt/PEM/EnterpriseDB-Apache
setenforce enforcing

export DATABASEHOST= <first server where you installed the database>

#export DATABASEHOST=172.17.0.2

##Following tempoary account can be used for the evaluation
export EDB_PORTAL_USER=ammppp@yahoo.com
export EDB_PORTAL_PASSWORD=Temp.Password.1
./installer.run --mode unattended --prefix /opt/PEM/pem --install-type web --pghost $DATABASEHOST --pguser enterprisedb --pgpassword enterprisedb --pgport 5444 --existing-user $EDB_PORTAL_USER --existing-password $EDB_PORTAL_PASSWORD

 



 

 

 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.